Skip to content

Commit

Permalink
unbeautify our base :: constant errors to match MRI's
Browse files Browse the repository at this point in the history
  • Loading branch information
enebo committed Apr 30, 2015
1 parent a94d7b2 commit 5da8955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/org/jruby/RubyModule.java
Expand Up @@ -2999,7 +2999,7 @@ public RubyBoolean const_defined_p19(ThreadContext context, IRubyObject[] args)
}

// Bare ::
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ::", fullName);
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ", fullName);

while((sep = symbol.indexOf("::")) != -1) {
String segment = symbol.substring(0, sep);
Expand Down Expand Up @@ -3048,7 +3048,7 @@ public IRubyObject const_get_2_0(ThreadContext context, IRubyObject[] args) {
}

// Bare ::
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ::", fullName);
if (symbol.length() == 0) throw context.runtime.newNameError("wrong constant name ", fullName);

while ((sep = symbol.indexOf("::")) != -1) {
String segment = symbol.substring(0, sep);
Expand Down

0 comments on commit 5da8955

Please sign in to comment.