Skip to content

Commit

Permalink
initial new HashSet instance was never used
Browse files Browse the repository at this point in the history
  • Loading branch information
kares committed Apr 16, 2015
1 parent c959e0b commit c384fd0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/org/jruby/RubyModule.java
Expand Up @@ -2766,11 +2766,10 @@ public Collection<String> constantsCommon(Ruby runtime, boolean replaceModule, b
return constantsCommon(runtime, replaceModule, allConstants, true);
}


public Collection<String> constantsCommon(Ruby runtime, boolean replaceModule, boolean allConstants, boolean includePrivate) {
RubyModule objectClass = runtime.getObject();
final RubyModule objectClass = runtime.getObject();

Collection<String> constantNames = new HashSet<String>();
final Collection<String> constantNames;
if (allConstants) {
if ((replaceModule && runtime.getModule() == this) || objectClass == this) {
constantNames = objectClass.getConstantNames(includePrivate);
Expand Down

0 comments on commit c384fd0

Please sign in to comment.