Skip to content

Commit

Permalink
Actually cache the idTest on the module.
Browse files Browse the repository at this point in the history
This was assigning to the local variable, so the  would be created ever time this is called.
  • Loading branch information
snowp committed Feb 24, 2017
1 parent f6b5d20 commit 24a14e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyModule.java
Expand Up @@ -302,7 +302,7 @@ public void addIncludingHierarchy(IncludedModule hierarchy) {
public MethodHandle getIdTest() {
MethodHandle idTest = this.idTest;
if (idTest != null) return idTest;
return idTest = newIdTest();
return this.idTest = newIdTest();
}

protected MethodHandle newIdTest() {
Expand Down

0 comments on commit 24a14e4

Please sign in to comment.