Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/jruby/ext/jruby/JRubyUtilLibrary.java
Original file line number Diff line number Diff line change
@@ -76,6 +76,9 @@ public static IRubyObject getObjectSpaceEnabled(IRubyObject recv) {
@JRubyMethod(name = "objectspace=", module = true)
public static IRubyObject setObjectSpaceEnabled(IRubyObject recv, IRubyObject arg) {
Ruby runtime = recv.getRuntime();
if (arg.isTrue()) {
runtime.getWarnings().warn("ObjectSpace impacts performance. See http://wiki.jruby.org/PerformanceTuning#dont-enable-objectspace");
}
runtime.setObjectSpaceEnabled(arg.isTrue());
return runtime.getNil();
}

0 comments on commit da88890

Please sign in to comment.