Skip to content

Commit

Permalink
better name for check case map options
Browse files Browse the repository at this point in the history
  • Loading branch information
lopex committed Apr 9, 2018
1 parent fe1f588 commit e8dfcb4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions core/src/main/java/org/jruby/RubyString.java
Expand Up @@ -1815,7 +1815,7 @@ public RubyString upcase19(ThreadContext context, IRubyObject[] args) {
@JRubyMethod(name = "upcase!", rest = true)
public IRubyObject upcase_bang19(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
int flags = StringSupport.checkCaseOptions(runtime, args, Config.CASE_UPCASE);
int flags = StringSupport.checkCaseMapOptions(runtime, args, Config.CASE_UPCASE);
modifyAndKeepCodeRange();
Encoding enc = checkDummyEncoding();

Expand Down Expand Up @@ -1871,7 +1871,7 @@ public RubyString downcase(ThreadContext context, IRubyObject[] args) {
@JRubyMethod(name = "downcase!", rest = true)
public IRubyObject downcase_bang(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
int flags = StringSupport.checkCaseOptions(runtime, args, Config.CASE_DOWNCASE);
int flags = StringSupport.checkCaseMapOptions(runtime, args, Config.CASE_DOWNCASE);
modifyAndKeepCodeRange();
Encoding enc = checkDummyEncoding();

Expand Down Expand Up @@ -1924,7 +1924,7 @@ public RubyString swapcase19(ThreadContext context, IRubyObject[] args) {
@JRubyMethod(name = "swapcase!", rest = true)
public IRubyObject swapcase_bang19(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
int flags = StringSupport.checkCaseOptions(runtime, args, Config.CASE_UPCASE | Config.CASE_DOWNCASE);
int flags = StringSupport.checkCaseMapOptions(runtime, args, Config.CASE_UPCASE | Config.CASE_DOWNCASE);
modifyAndKeepCodeRange();
Encoding enc = checkDummyEncoding();

Expand Down Expand Up @@ -1961,7 +1961,7 @@ public IRubyObject capitalize19(ThreadContext context, IRubyObject[] args) {
@JRubyMethod(name = "capitalize!", rest = true)
public IRubyObject capitalize_bang19(ThreadContext context, IRubyObject[] args) {
Ruby runtime = context.runtime;
int flags = StringSupport.checkCaseOptions(runtime, args, Config.CASE_UPCASE | Config.CASE_TITLECASE);
int flags = StringSupport.checkCaseMapOptions(runtime, args, Config.CASE_UPCASE | Config.CASE_TITLECASE);
Encoding enc = checkDummyEncoding();

if (value.getRealSize() == 0) {
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/util/StringSupport.java
Expand Up @@ -2409,7 +2409,7 @@ private static int rb_memsearch_qs_utf8(byte[] xsBytes, int xs, int m, byte[] ys
return -1;
}

public static int checkCaseOptions(Ruby runtime, IRubyObject[]args, int flags) {
public static int checkCaseMapOptions(Ruby runtime, IRubyObject[]args, int flags) {
if (args.length == 0) return flags;
if (args.length > 2) throw runtime.newArgumentError("too many options");

Expand Down

0 comments on commit e8dfcb4

Please sign in to comment.