diff options
author | Aaron Patterson <[email protected]> | 2025-05-01 12:13:31 -0700 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2025-05-15 14:19:48 -0700 |
commit | 55c9c75b4788f6411bfa14f0e7d462d06850f60d (patch) | |
tree | d1dc1096542557f4d7cecba54e8869c34543ca7e | |
parent | 04f538c1441e65def90d5b4224010e7d4f4ffab3 (diff) |
Maintain same behavior regardless of tracepoint state
Always use opt_new behavior regardless of tracepoint state.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13232
-rw-r--r-- | insns.def | 2 | ||||
-rw-r--r-- | test/ruby/test_settracefunc.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -919,7 +919,7 @@ opt_new // The bookkeeping slot should be empty. RUBY_ASSERT(TOPN(argc + 1) == Qnil); - if (vm_method_cfunc_is(GET_ISEQ(), cd, val, rb_class_new_instance_pass_kw) && !(ruby_vm_event_flags & ISEQ_TRACE_EVENTS)) { + if (vm_method_cfunc_is(GET_ISEQ(), cd, val, rb_class_new_instance_pass_kw)) { RB_DEBUG_COUNTER_INC(opt_new_hit); val = rb_obj_alloc(val); TOPN(argc) = val; diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 55c07abbea..fac6dd8185 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1999,7 +1999,7 @@ CODE TracePoint.new(:c_call, &capture_events).enable{ c.new } - assert_equal [:c_call, :itself, :initialize], events[1] + assert_equal [:c_call, :itself, :initialize], events[0] events.clear o = Class.new{ |