Maintain same behavior regardless of tracepoint state
Always use opt_new behavior regardless of tracepoint state.
This commit is contained in:
parent
04f538c144
commit
55c9c75b47
Notes:
git
2025-05-15 21:20:01 +00:00
@ -919,7 +919,7 @@ opt_new
|
|||||||
// The bookkeeping slot should be empty.
|
// The bookkeeping slot should be empty.
|
||||||
RUBY_ASSERT(TOPN(argc + 1) == Qnil);
|
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);
|
RB_DEBUG_COUNTER_INC(opt_new_hit);
|
||||||
val = rb_obj_alloc(val);
|
val = rb_obj_alloc(val);
|
||||||
TOPN(argc) = val;
|
TOPN(argc) = val;
|
||||||
|
@ -1999,7 +1999,7 @@ CODE
|
|||||||
TracePoint.new(:c_call, &capture_events).enable{
|
TracePoint.new(:c_call, &capture_events).enable{
|
||||||
c.new
|
c.new
|
||||||
}
|
}
|
||||||
assert_equal [:c_call, :itself, :initialize], events[1]
|
assert_equal [:c_call, :itself, :initialize], events[0]
|
||||||
events.clear
|
events.clear
|
||||||
|
|
||||||
o = Class.new{
|
o = Class.new{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user