aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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