TracePoint: Support .trace #4800
Closed
Milestone
Comments
Wanna just throw the workaround into a bit of Ruby for a PR? core/src/main/ruby has the Ruby bits of JRuby. |
Thanks. Currently bowling, badly, but I’m giving this a shot later. |
Interestingly this exposed a small bug I had forgotten about: we don't actually trace the return from "c" functions if the trace was enabled mid-call. So the output now doesn't even have a return event I was unable to find a bug for this, so it must not be a big concern for anyone using tracing (e.g. set_trace_func has been used for a long time but nobody complained that it didn't trace itself returning). In any case, I think omitting the event is still better than emitting the "wrong" event, so we'll stick with this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue records the fact that
TracePoint.trace
is not supported. It does a combined instantiation and enabling of a TracePoint instance.The JRuby extension TracePoint.java seems not to implement
.trace
and.stat
Workaround: JRuby's TracePoint has
.new
. and#enable
. UseTracePoint.new
and then#enable
the resultingTracePoint
instance.Environment
Expected Behavior
TracePoint.trace
instantiates and enables a TracePoint.Example script to run:
Example execution:
Actual Behavior
A
NoMethodError
is raised.The text was updated successfully, but these errors were encountered: