summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-11 07:53:16 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-11 07:53:16 +0000
commit919f1438ae30848b8f1b9e7071c27c302049a0f0 (patch)
treef9ca6caa71bff39a7a2abbf1cf04b1de7bd54d52
parent78d7aa8ae37ab7be93c7dbf038024ec087851731 (diff)
* eval.c (rb_raise_jump): call c_return hook immediately after
popping `raise' frame. Patches by deivid (David Rodriguez). [Bug #8886] * test/ruby/test_settracefunc.rb: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--eval.c2
-rw-r--r--test/ruby/test_settracefunc.rb6
3 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 23ff975a56..6891d3b284 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Dec 11 16:45:58 2013 Koichi Sasada <ko1@atdot.net>
+
+ * eval.c (rb_raise_jump): call c_return hook immediately after
+ popping `raise' frame.
+ Patches by deivid (David Rodriguez). [Bug #8886]
+
+ * test/ruby/test_settracefunc.rb: catch up this fix.
+
Wed Dec 11 16:01:26 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (rb_hash_reject): return a plain hash, without copying
diff --git a/eval.c b/eval.c
index 873d549739..c49fd88f02 100644
--- a/eval.c
+++ b/eval.c
@@ -689,10 +689,10 @@ rb_raise_jump(VALUE mesg)
ID mid = cfp->me->called_id;
th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp);
+ EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass, Qnil);
setup_exception(th, TAG_RAISE, mesg);
- EXEC_EVENT_HOOK(th, RUBY_EVENT_C_RETURN, self, mid, klass, Qnil);
rb_thread_raised_clear(th);
JUMP_TAG(TAG_RAISE);
}
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index 1de7b901b0..7e9bcf5d2a 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -253,14 +253,14 @@ class TestSetTraceFunc < Test::Unit::TestCase
events.shift)
assert_equal(["c-return", 5, :exception, Exception],
events.shift)
+ assert_equal(["c-return", 5, :raise, Kernel],
+ events.shift)
assert_equal(["c-call", 5, :backtrace, Exception],
events.shift)
assert_equal(["c-return", 5, :backtrace, Exception],
events.shift)
assert_equal(["raise", 5, :test_raise, TestSetTraceFunc],
events.shift)
- assert_equal(["c-return", 5, :raise, Kernel],
- events.shift)
assert_equal(["c-call", 6, :===, Module],
events.shift)
assert_equal(["c-return", 6, :===, Module],
@@ -515,10 +515,10 @@ class TestSetTraceFunc < Test::Unit::TestCase
[:c_call, 20, "xyzzy", Exception, :initialize, raised_exc, :outer, :nothing],
[:c_return,20, "xyzzy", Exception, :initialize, raised_exc, :outer, raised_exc],
[:c_return,20, "xyzzy", Exception, :exception, RuntimeError, :outer, raised_exc],
+ [:c_return,20, "xyzzy", Kernel, :raise, self, :outer, nil],
[:c_call, 20, "xyzzy", Exception, :backtrace, raised_exc, :outer, :nothing],
[:c_return,20, "xyzzy", Exception, :backtrace, raised_exc, :outer, nil],
[:raise, 20, "xyzzy", TestSetTraceFunc, :trace_by_tracepoint, self, :outer, raised_exc],
- [:c_return,20, "xyzzy", Kernel, :raise, self, :outer, nil],
[:c_call, 20, "xyzzy", Module, :===, RuntimeError,:outer, :nothing],
[:c_return,20, "xyzzy", Module, :===, RuntimeError,:outer, true],
[:line, 21, "xyzzy", TestSetTraceFunc, method, self, :outer, :nothing],