aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-09 02:00:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-10-09 02:00:21 +0000
commit549b0c53a8b744c12dfeaed14bbb3d390209f516 (patch)
treed1f9912aaa5764c3c5ce04ad9acf077d583bba45 /test/ruby
parentc3032fa749594900b130593481b40b9c34c9076b (diff)
downloadruby-549b0c53a8b744c12dfeaed14bbb3d390209f516.tar.gz
* thread.c (thread_reset_event_flags, exec_event_hooks): ignore
hooks marked as removed. * thread.c (thread_exec_event_hooks): remove hooks to be removed. * thread.c (rb_threadptr_remove_event_hook, rb_remove_event_hook): defer removing hooks if running the hooks. [ruby-dev:42350] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_settracefunc.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb
index f885cb0042..576b4dad40 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -354,4 +354,16 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal([], events[:set])
assert_equal([], events[:add])
end
+
+ def test_remove_in_trace
+ bug3921 = '[ruby-dev:42350]'
+ ok = false
+ func = lambda{|e, f, l, i, b, k|
+ set_trace_func(nil)
+ ok = eval("self", b)
+ }
+
+ set_trace_func(func)
+ assert_equal(self, ok, bug3921)
+ end
end