From 38a22404db6722fc61def0600d015a3dbc4a35c9 Mon Sep 17 00:00:00 2001 From: wanabe Date: Tue, 18 Aug 2009 02:44:10 +0000 Subject: [PATCH] * vm_insnhelper.c (vm_call_cfunc): ensure hook c-return. [Bug #1588] * test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise): follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ test/ruby/test_settracefunc.rb | 2 ++ vm_insnhelper.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8264b44a91..3b30e90e3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Aug 18 11:37:24 2009 wanabe + + * vm_insnhelper.c (vm_call_cfunc): ensure hook c-return. + [Bug #1588] + + * test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise): + follow above. + Tue Aug 18 01:57:00 2009 Yukihiro Matsumoto * range.c (range_step): treat symbols specially so that iterating diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 8e06c3b515..9486163770 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -167,6 +167,8 @@ class TestSetTraceFunc < Test::Unit::TestCase 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], diff --git a/vm_insnhelper.c b/vm_insnhelper.c index be8b07ed17..5da3f1783b 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -370,7 +370,7 @@ vm_call_cfunc(rb_thread_t *th, rb_control_frame_t *reg_cfp, #if defined(__cplusplus) || (__STDC_VERSION__ >= 199901L) // TODO: fix me. separate event #endif - if (th->event_flags & RUBY_EVENT_C_RETURN) { + if (th->event_flags & (RUBY_EVENT_C_RETURN | RUBY_EVENT_VM)) { state = TH_EXEC_TAG(); } else {