diff --git a/spec/ruby/core/tracepoint/enable_spec.rb b/spec/ruby/core/tracepoint/enable_spec.rb index 720adfcd4b..52c2248656 100644 --- a/spec/ruby/core/tracepoint/enable_spec.rb +++ b/spec/ruby/core/tracepoint/enable_spec.rb @@ -306,7 +306,7 @@ describe 'TracePoint#enable' do trace.enable(target: -> {}) do end end - }.should raise_error(ArgumentError, /can't nest-enable a targetting TracePoint/) + }.should raise_error(ArgumentError, /can't nest-enable a targett?ing TracePoint/) end it "raises ArgumentError if trace point already enabled without target is re-enabled with target" do @@ -318,7 +318,7 @@ describe 'TracePoint#enable' do trace.enable(target: -> {}) do end end - }.should raise_error(ArgumentError, /can't nest-enable a targetting TracePoint/) + }.should raise_error(ArgumentError, /can't nest-enable a targett?ing TracePoint/) end it "raises ArgumentError if trace point already enabled with target is re-enabled without target" do @@ -330,7 +330,7 @@ describe 'TracePoint#enable' do trace.enable do end end - }.should raise_error(ArgumentError, /can't nest-enable a targetting TracePoint/) + }.should raise_error(ArgumentError, /can't nest-enable a targett?ing TracePoint/) end it "raises ArgumentError if trace point already enabled with target is disabled with block" do @@ -342,7 +342,7 @@ describe 'TracePoint#enable' do trace.disable do end end - }.should raise_error(ArgumentError, /can't disable a targetting TracePoint in a block/) + }.should raise_error(ArgumentError, /can't disable a targett?ing TracePoint in a block/) end it "traces events when trace point with target is enabled in another trace point enabled without target" do diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index f8268ead68..2cf25260cb 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -1991,7 +1991,7 @@ class TestSetTraceFunc < Test::Unit::TestCase tp.enable(target: code2){} } end - assert_equal "can't nest-enable a targetting TracePoint", ex.message + assert_equal "can't nest-enable a targeting TracePoint", ex.message # global TP and targetted TP ex = assert_raise(ArgumentError) do @@ -2000,7 +2000,7 @@ class TestSetTraceFunc < Test::Unit::TestCase tp.enable(target: code2){} } end - assert_equal "can't nest-enable a targetting TracePoint", ex.message + assert_equal "can't nest-enable a targeting TracePoint", ex.message # targetted TP and global TP ex = assert_raise(ArgumentError) do @@ -2009,7 +2009,7 @@ class TestSetTraceFunc < Test::Unit::TestCase tp.enable{} } end - assert_equal "can't nest-enable a targetting TracePoint", ex.message + assert_equal "can't nest-enable a targeting TracePoint", ex.message # targetted TP and disable ex = assert_raise(ArgumentError) do @@ -2018,9 +2018,9 @@ class TestSetTraceFunc < Test::Unit::TestCase tp.disable{} } end - assert_equal "can't disable a targetting TracePoint in a block", ex.message + assert_equal "can't disable a targeting TracePoint in a block", ex.message - ## success with two nesting targetting tracepoints + ## success with two nesting targeting tracepoints events = [] tp1 = TracePoint.new(:line){|tp| events << :tp1} tp2 = TracePoint.new(:line){|tp| events << :tp2} @@ -2032,7 +2032,7 @@ class TestSetTraceFunc < Test::Unit::TestCase end assert_equal [:tp2, :tp1, :___], events - # succss with two tracepoints (global/targetting) + # succss with two tracepoints (global/targeting) events = [] tp1 = TracePoint.new(:line){|tp| events << :tp1} tp2 = TracePoint.new(:line){|tp| events << :tp2} @@ -2044,7 +2044,7 @@ class TestSetTraceFunc < Test::Unit::TestCase end assert_equal [:tp1, :tp1, :tp1, :tp1, :tp2, :tp1, :___], events - # succss with two tracepoints (targetting/global) + # succss with two tracepoints (targeting/global) events = [] tp1 = TracePoint.new(:line){|tp| events << :tp1} tp2 = TracePoint.new(:line){|tp| events << :tp2} diff --git a/vm_trace.c b/vm_trace.c index a3dc0fd817..d778f244b1 100644 --- a/vm_trace.c +++ b/vm_trace.c @@ -1206,7 +1206,7 @@ rb_tracepoint_enable(VALUE tpval) tp = tpptr(tpval); if (tp->local_target_set != Qfalse) { - rb_raise(rb_eArgError, "can't nest-enable a targetting TracePoint"); + rb_raise(rb_eArgError, "can't nest-enable a targeting TracePoint"); } if (tp->target_th) { @@ -1244,7 +1244,7 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line) unsigned int line = 0; if (tp->tracing > 0) { - rb_raise(rb_eArgError, "can't nest-enable a targetting TracePoint"); + rb_raise(rb_eArgError, "can't nest-enable a targeting TracePoint"); } if (!NIL_P(target_line)) { @@ -1445,7 +1445,7 @@ tracepoint_disable_m(VALUE tpval) if (rb_block_given_p()) { if (tp->local_target_set != Qfalse) { - rb_raise(rb_eArgError, "can't disable a targetting TracePoint in a block"); + rb_raise(rb_eArgError, "can't disable a targeting TracePoint in a block"); } rb_tracepoint_disable(tpval);