Skip to content

Commit

Permalink
"Optimize" Proc#call to not show in backtrace.
Browse files Browse the repository at this point in the history
MRI 2.3 optimizes Proc#call to not allocate a stack frame and not
show up in backtraces. In JRuby, we already did not allocate a
frame, so all that was needed was to omit the call from backtrace.

See https://bugs.ruby-lang.org/issues/11569

For #3479.
headius committed Dec 12, 2015
1 parent cacd648 commit 2653de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyProc.java
Original file line number Diff line number Diff line change
@@ -319,7 +319,7 @@ public static IRubyObject[] prepareArgs(ThreadContext context, Block.Type type,
return args;
}

@JRubyMethod(name = {"call", "[]", "yield", "==="}, rest = true)
@JRubyMethod(name = {"call", "[]", "yield", "==="}, rest = true, omit = true)
public IRubyObject call19(ThreadContext context, IRubyObject[] args, Block blockCallArg) {
IRubyObject[] preppedArgs = prepareArgs(context, type, block.getBody(), args);

0 comments on commit 2653de1

Please sign in to comment.