Skip to content

Commit c384fd0

Browse files
committed
initial new HashSet instance was never used
1 parent c959e0b commit c384fd0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/src/main/java/org/jruby/RubyModule.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,11 +2766,10 @@ public Collection<String> constantsCommon(Ruby runtime, boolean replaceModule, b
27662766
return constantsCommon(runtime, replaceModule, allConstants, true);
27672767
}
27682768

2769-
27702769
public Collection<String> constantsCommon(Ruby runtime, boolean replaceModule, boolean allConstants, boolean includePrivate) {
2771-
RubyModule objectClass = runtime.getObject();
2770+
final RubyModule objectClass = runtime.getObject();
27722771

2773-
Collection<String> constantNames = new HashSet<String>();
2772+
final Collection<String> constantNames;
27742773
if (allConstants) {
27752774
if ((replaceModule && runtime.getModule() == this) || objectClass == this) {
27762775
constantNames = objectClass.getConstantNames(includePrivate);

0 commit comments

Comments
 (0)