Skip to content

Commit

Permalink
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/IncludedModule.java
Original file line number Diff line number Diff line change
@@ -9,6 +9,9 @@ public IncludedModule(Ruby runtime, RubyClass superClass, RubyModule origin) {
super(runtime, superClass, false);
this.origin = origin;
this.metaClass = origin.metaClass;
if (superClass != null) {
setClassIndex(superClass.getClassIndex()); // use same ClassIndex as metaclass, since we're technically still of that type
}
}

@Override
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/MetaClass.java
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ public final class MetaClass extends RubyClass {
public MetaClass(Ruby runtime, RubyClass superClass, IRubyObject attached) {
super(runtime, superClass, false);
this.attached = attached;
setClassIndex(superClass.classIndex); // use same ClassIndex as metaclass, since we're technically still of that type
setClassIndex(superClass.getClassIndex()); // use same ClassIndex as metaclass, since we're technically still of that type
}

@Override

0 comments on commit 2661806

Please sign in to comment.