Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
import org.jruby.Ruby;
import org.jruby.runtime.Constants;
import org.jruby.truffle.nodes.LazyRubyRootNode;
import org.jruby.truffle.nodes.RubyGuards;
import org.jruby.truffle.nodes.RubyNode;
import org.jruby.truffle.nodes.instrument.RubyWrapperNode;

@@ -117,7 +118,11 @@ protected Object evalInContext(Source source, Node node, MaterializedFrame mFram

@Override
protected String toString(RubyContext context, Object value) {
return context.send(value, "inspect", null).toString();
if (RubyGuards.isForeignObject(value)) {
return "<foreign>";
} else {
return context.send(value, "inspect", null).toString();
}
}

public Node unprotectedCreateFindContextNode() {

0 comments on commit ddcfe87

Please sign in to comment.