diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-28 04:31:42 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-11-28 04:31:42 +0000 |
commit | e9dbafa5c89845ccde3b20fb8e1de4277afcdb53 (patch) | |
tree | ef12d8c96330f1bce675380da8005c235328087a | |
parent | 79dd244c3aacac272120c19f36a641c5c48a08a0 (diff) | |
download | ruby-e9dbafa5c89845ccde3b20fb8e1de4277afcdb53.tar.gz |
test_settracefunc (test_tracepoint_enable_with_target_line): less fragile
Allow us to make other changes to the file and move the method
around without affecting this test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | test/ruby/test_settracefunc.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index cb4c1cabc3..edbc1e9956 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -2059,6 +2059,7 @@ class TestSetTraceFunc < Test::Unit::TestCase def test_tracepoint_enable_with_target_line events = [] + line_0 = __LINE__ code1 = proc{ events << 1 events << 2 @@ -2067,7 +2068,7 @@ class TestSetTraceFunc < Test::Unit::TestCase tp = TracePoint.new(:line) do |tp| events << :tp end - tp.enable(target: code1, target_line: 2064) do + tp.enable(target: code1, target_line: line_0 + 3) do code1.call end assert_equal [1, :tp, 2, 3], events |