diff options
-rw-r--r-- | test/ruby/test_settracefunc.rb | 22 | ||||
-rw-r--r-- | vm_method.c | 4 | ||||
-rw-r--r-- | vm_trace.c | 4 |
3 files changed, 28 insertions, 2 deletions
@@ -2364,6 +2364,28 @@ CODE assert_equal [:tp1, 1, 2, :tp2, 3], events end def test_script_compiled events = [] tp = TracePoint.new(:script_compiled){|tp| @@ -405,7 +405,9 @@ rb_method_definition_release(rb_method_definition_t *def, int complemented) if (alias_count + complemented_count == 0) { if (METHOD_DEBUG) fprintf(stderr, "-%p-%s:%d,%d (remove)\n", (void *)def, rb_id2name(def->original_id), alias_count, complemented_count); - VM_ASSERT(def->type == VM_METHOD_TYPE_BMETHOD ? def->body.bmethod.hooks == NULL : TRUE); xfree(def); } else { @@ -1226,7 +1226,9 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line) rb_method_definition_t *def = (rb_method_definition_t *)rb_method_def(target); if (def->type == VM_METHOD_TYPE_BMETHOD && (tp->events & (RUBY_EVENT_CALL | RUBY_EVENT_RETURN))) { - def->body.bmethod.hooks = ZALLOC(rb_hook_list_t); rb_hook_list_connect_tracepoint(target, def->body.bmethod.hooks, tpval, 0); rb_hash_aset(tp->local_target_set, target, Qfalse); target_bmethod = true; |