summaryrefslogtreecommitdiff
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-04 14:29:17 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-04 14:29:17 +0000
commitfabb2fed252c634d9196813d452667e8a0ed80ac (patch)
treee3309c8c6737cf70569f645c061b1a02b6d1bdb2 /test/ruby/test_settracefunc.rb
parent194a55259bc5d58b48c00f01030b460072aa7fd3 (diff)
merge revision(s) 66977: [Backport #15578]
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/branches/ruby_2_6@67726 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 2ada093f8d..6021038fe9 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -2115,4 +2115,16 @@ class TestSetTraceFunc < Test::Unit::TestCase
}
assert_equal [], 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