aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
authorktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-18 08:21:08 +0000
committerktsj <ktsj@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-18 08:21:08 +0000
commit5b8fe55422509b5b6c47eaa0b8ad8055e9ee6675 (patch)
tree989fa98378a43cb12c4ce3a75466645e72189488 /test/ruby/test_settracefunc.rb
parent2e64ac392e41e215a0596de0d057fb2fd8708011 (diff)
downloadruby-5b8fe55422509b5b6c47eaa0b8ad8055e9ee6675.tar.gz
vm.c: fix `cfp consistency error' which occurs
when raising exception in bmethod call event * vm.c (invoke_bmethod): set FINISH flag just before calling vm_exec. [ruby-dev:50162] [Bug #13705] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-rw-r--r--test/ruby/test_settracefunc.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 2b32a155d5..c274a25cac 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -1741,4 +1741,25 @@ class TestSetTraceFunc < Test::Unit::TestCase
tp_return_value(:f_break_in_rescue),
'[Bug #13369]'
end
+
+ def test_trace_point_raising_exception_in_bmethod_call
+ bug13705 = '[ruby-dev:50162]'
+ assert_normal_exit %q{
+ define_method(:m) {}
+
+ tp = TracePoint.new(:call) do
+ raise ''
+ end
+
+ tap do
+ tap do
+ begin
+ tp.enable
+ m
+ rescue
+ end
+ end
+ end
+ }, bug13705
+ end
end