mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
41d36d2ce2
commit
ede77e64a7
3 changed files with 14 additions and 14 deletions
|
@ -306,7 +306,7 @@ describe 'TracePoint#enable' do
|
||||||
trace.enable(target: -> {}) do
|
trace.enable(target: -> {}) do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
it "raises ArgumentError if trace point already enabled without target is re-enabled with target" do
|
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
|
trace.enable(target: -> {}) do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
it "raises ArgumentError if trace point already enabled with target is re-enabled without target" do
|
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
|
trace.enable do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
it "raises ArgumentError if trace point already enabled with target is disabled with block" do
|
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
|
trace.disable do
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|
||||||
it "traces events when trace point with target is enabled in another trace point enabled without target" do
|
it "traces events when trace point with target is enabled in another trace point enabled without target" do
|
||||||
|
|
|
@ -1991,7 +1991,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
tp.enable(target: code2){}
|
tp.enable(target: code2){}
|
||||||
}
|
}
|
||||||
end
|
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
|
# global TP and targetted TP
|
||||||
ex = assert_raise(ArgumentError) do
|
ex = assert_raise(ArgumentError) do
|
||||||
|
@ -2000,7 +2000,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
tp.enable(target: code2){}
|
tp.enable(target: code2){}
|
||||||
}
|
}
|
||||||
end
|
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
|
# targetted TP and global TP
|
||||||
ex = assert_raise(ArgumentError) do
|
ex = assert_raise(ArgumentError) do
|
||||||
|
@ -2009,7 +2009,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
tp.enable{}
|
tp.enable{}
|
||||||
}
|
}
|
||||||
end
|
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
|
# targetted TP and disable
|
||||||
ex = assert_raise(ArgumentError) do
|
ex = assert_raise(ArgumentError) do
|
||||||
|
@ -2018,9 +2018,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
tp.disable{}
|
tp.disable{}
|
||||||
}
|
}
|
||||||
end
|
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 = []
|
events = []
|
||||||
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
||||||
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
||||||
|
@ -2032,7 +2032,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
assert_equal [:tp2, :tp1, :___], events
|
assert_equal [:tp2, :tp1, :___], events
|
||||||
|
|
||||||
# succss with two tracepoints (global/targetting)
|
# succss with two tracepoints (global/targeting)
|
||||||
events = []
|
events = []
|
||||||
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
||||||
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
||||||
|
@ -2044,7 +2044,7 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
assert_equal [:tp1, :tp1, :tp1, :tp1, :tp2, :tp1, :___], events
|
assert_equal [:tp1, :tp1, :tp1, :tp1, :tp2, :tp1, :___], events
|
||||||
|
|
||||||
# succss with two tracepoints (targetting/global)
|
# succss with two tracepoints (targeting/global)
|
||||||
events = []
|
events = []
|
||||||
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
tp1 = TracePoint.new(:line){|tp| events << :tp1}
|
||||||
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
tp2 = TracePoint.new(:line){|tp| events << :tp2}
|
||||||
|
|
|
@ -1206,7 +1206,7 @@ rb_tracepoint_enable(VALUE tpval)
|
||||||
tp = tpptr(tpval);
|
tp = tpptr(tpval);
|
||||||
|
|
||||||
if (tp->local_target_set != Qfalse) {
|
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) {
|
if (tp->target_th) {
|
||||||
|
@ -1244,7 +1244,7 @@ rb_tracepoint_enable_for_target(VALUE tpval, VALUE target, VALUE target_line)
|
||||||
unsigned int line = 0;
|
unsigned int line = 0;
|
||||||
|
|
||||||
if (tp->tracing > 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)) {
|
if (!NIL_P(target_line)) {
|
||||||
|
@ -1445,7 +1445,7 @@ tracepoint_disable_m(VALUE tpval)
|
||||||
|
|
||||||
if (rb_block_given_p()) {
|
if (rb_block_given_p()) {
|
||||||
if (tp->local_target_set != Qfalse) {
|
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);
|
rb_tracepoint_disable(tpval);
|
||||||
|
|
Loading…
Reference in a new issue