summaryrefslogtreecommitdiff
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-01 05:11:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-02-01 05:11:08 +0000
commit1bc6c3f40777ca10d8e7df38b775b0bb81a25881 (patch)
tree8f2fb4bdb3dfcc0a4af0b70b0b4f0cd42af30ce8 /test/ruby/test_settracefunc.rb
parente826b7d39e0e1a58caa8554d8fe8426f919f726a (diff)
Revert r63383, r63248 "compile.c: copy a short insn with leave"
When copying `leave` insn, TRACE also should be copied if it is present, but this optimization is trivial and not worth the complexity. [ruby-core:91366] [Bug #15578] 4cae5353c03009beb1e0a1619422072773580609 5afd479de63b6609ddcd1510da94d2c1ac384f7f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r--test/ruby/test_settracefunc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 6c07bf90f6..f8268ead68 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -2153,4 +2153,16 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal Array.new(2){th}, events
end
+
+ def test_return_event_with_rescue
+ obj = Object.new
+ def obj.example
+ 1 if 1 == 1
+ rescue
+ end
+ ok = false
+ tp = TracePoint.new(:return) {ok = true}
+ tp.enable {obj.example}
+ assert ok, "return event should be emitted"
+ end
end