summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 14:53:26 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 14:53:26 +0000
commit2fd7044e9a79df6b7f8248e8bae8d1850a211da1 (patch)
tree442d8f534ca22bdfc4bd344632627d17c30a0fa9 /test
parentcc23dc6b239466817ec50c74c77264944180e1c8 (diff)
merge revision(s) 59956: [Backport #13705]
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/branches/ruby_2_3@62815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 82fa2faaf9..cf11474ab5 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -1634,4 +1634,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