summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-05 05:04:41 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-05 05:04:41 +0000
commitb35d1e714c1df44b5346e35a6dc519da5e8de4d5 (patch)
treea810917b0517707971dc9f4f9bb5392f02fb2b52 /test/ruby
parentfd4d1dde2f88547afadb8270143911adfd50d916 (diff)
* thread.c (rb_threadptr_exec_event_hooks): new function to
execute event hooks, with preserving errinfo. [ruby-core:24118] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_settracefunc.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index a446969..5898ce4 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -181,4 +181,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
def test_invalid_proc
assert_raise(TypeError) { set_trace_func(1) }
end
+
+ def test_raise_in_trace
+ set_trace_func proc {raise rescue nil}
+ assert_equal(42, (raise rescue 42), '[ruby-core:24118]')
+ end
end