Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions core/src/main/java/org/jruby/ext/tracepoint/TracePoint.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.TypeConverter;

import static org.jruby.runtime.ThreadContext.resetCallInfo;
import static org.jruby.util.RubyStringBuilder.str;

public class TracePoint extends RubyObject {
Expand Down Expand Up @@ -85,6 +86,8 @@ public IRubyObject initialize(ThreadContext context, IRubyObject[] _events, fina
public void event(ThreadContext context, RubyEvent event, String file, int line, String name, IRubyObject type) {
if (!enabled || context.isWithinTrace()) return;

int savedCallInfo = resetCallInfo(context);

synchronized (this) {
inside = true;

Expand All @@ -109,6 +112,7 @@ public void event(ThreadContext context, RubyEvent event, String file, int line,
update(null, null, line, null, context.nil, context.nil, context.nil, context.nil);
context.postTrace();
inside = false;
context.callInfo = savedCallInfo;
}
}
}
Expand Down