Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/main/java/org/jruby/ext/tracepoint/TracePoint.java
Original file line number Diff line number Diff line change
@@ -215,6 +215,13 @@ public IRubyObject return_value(ThreadContext context) {
public IRubyObject self(ThreadContext context) {
return binding.isNil() ? context.nil : ((RubyBinding)binding).getBinding().getSelf();
}

@JRubyMethod(rest = true, meta = true)
public static IRubyObject trace(ThreadContext context, IRubyObject self, IRubyObject[] events, Block block) {
TracePoint tp = (TracePoint) self.callMethod(context, "new", events, block);
tp.enable(context, Block.NULL_BLOCK);
return tp;
}

private void update(String eventName, String file, int line, String name, IRubyObject type, IRubyObject exception, IRubyObject returnValue, IRubyObject binding) {
// TODO: missing exception, self, return value

0 comments on commit ec60746

Please sign in to comment.