aboutsummaryrefslogtreecommitdiffstats
path: root/vm_trace.c
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-04-26 15:21:52 -0700
committerJeremy Evans <code@jeremyevans.net>2021-04-26 15:21:52 -0700
commitd585799d7303abeb1b0ca6fc868f0b2d76a26250 (patch)
tree5e85b1064f430a99a243077051d5912637900d9d /vm_trace.c
parent203eeeefddb3ae6c0e129ad9cd99da804c2cbaba (diff)
downloadruby-d585799d7303abeb1b0ca6fc868f0b2d76a26250.tar.gz
Document binding behavior for C call/return events for TracePoint/set_trace_func
C methods do not have bindings, so binding returns the binding of the nearest C method. Fixes [Bug #9009]
Diffstat (limited to 'vm_trace.c')
-rw-r--r--vm_trace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm_trace.c b/vm_trace.c
index 383f255799..6e2c058779 100644
--- a/vm_trace.c
+++ b/vm_trace.c
@@ -519,6 +519,10 @@ static void call_trace_func(rb_event_flag_t, VALUE data, VALUE self, ID id, VALU
* line prog.rb:3 test Test
* line prog.rb:4 test Test
* return prog.rb:4 test Test
+ *
+ * Note that for +c-call+ and +c-return+ events, the binding returned is the
+ * binding of the nearest Ruby method calling the C method, since C methods
+ * themselves do not have bindings.
*/
static VALUE