ruby-changes:55142
From: kazu <ko1@a...>
Date: Thu, 28 Mar 2019 08:56:20 +0900 (JST)
Subject: [ruby-changes:55142] kazu:r67349 (trunk): Fix typos
kazu 2019-03-28 08:56:14 +0900 (Thu, 28 Mar 2019) New Revision: 67349 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=67349 Log: Fix typos Modified files: trunk/spec/ruby/core/tracepoint/enable_spec.rb trunk/test/ruby/test_settracefunc.rb trunk/vm_trace.c Index: test/ruby/test_settracefunc.rb =================================================================== --- test/ruby/test_settracefunc.rb (revision 67348) +++ test/ruby/test_settracefunc.rb (revision 67349) @@ -1991,7 +1991,7 @@ class TestSetTraceFunc < Test::Unit::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L1991 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::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2000 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::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2009 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::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2018 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::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2032 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::Tes https://github.com/ruby/ruby/blob/trunk/test/ruby/test_settracefunc.rb#L2044 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} Index: spec/ruby/core/tracepoint/enable_spec.rb =================================================================== --- spec/ruby/core/tracepoint/enable_spec.rb (revision 67348) +++ spec/ruby/core/tracepoint/enable_spec.rb (revision 67349) @@ -306,7 +306,7 @@ describe 'TracePoint#enable' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/tracepoint/enable_spec.rb#L306 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/tracepoint/enable_spec.rb#L318 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/tracepoint/enable_spec.rb#L330 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 https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/tracepoint/enable_spec.rb#L342 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 Index: vm_trace.c =================================================================== --- vm_trace.c (revision 67348) +++ vm_trace.c (revision 67349) @@ -1206,7 +1206,7 @@ rb_tracepoint_enable(VALUE tpval) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1206 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 tp https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1244 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) https://github.com/ruby/ruby/blob/trunk/vm_trace.c#L1445 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); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/