File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
truffle/src/main/java/org/jruby/truffle/runtime/core Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 1212import com .oracle .truffle .api .CompilerAsserts ;
1313import com .oracle .truffle .api .CompilerDirectives .CompilationFinal ;
1414import com .oracle .truffle .api .nodes .Node ;
15+
1516import org .jruby .truffle .nodes .RubyNode ;
1617import org .jruby .truffle .nodes .objects .Allocator ;
1718import org .jruby .truffle .runtime .RubyContext ;
19+ import org .jruby .truffle .runtime .subsystems .ObjectSpaceManager .ObjectGraphVisitor ;
1820
1921import java .util .Collections ;
2022import java .util .Set ;
@@ -149,6 +151,14 @@ public Allocator getAllocator() {
149151 return allocator ;
150152 }
151153
154+ @ Override
155+ public void visitObjectGraph (ObjectGraphVisitor visitor ) {
156+ // MRI consider all singleton classes as internal objects.
157+ if (!isSingleton ) {
158+ super .visitObjectGraph (visitor );
159+ }
160+ }
161+
152162 public static class ClassAllocator implements Allocator {
153163
154164 @ Override
You can’t perform that action at this time.
0 commit comments