summaryrefslogtreecommitdiff
path: root/test/ruby/test_settracefunc.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_settracefunc.rb')
-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 9837448ce4..970c1a650e 100644
--- a/test/ruby/test_settracefunc.rb
+++ b/test/ruby/test_settracefunc.rb
@@ -1188,6 +1188,18 @@ class TestSetTraceFunc < Test::Unit::TestCase
assert_equal([['call', :foo], ['return', :foo]], events, 'Bug #9759')
ensure
end
+ end
+ def test_recursive
+ assert_ruby_status [], %q{
+ stack = []
+ TracePoint.new(:c_call){|tp|
+ p 2
+ stack << tp.method_id
+ }.enable{
+ p 1
+ }
+ raise if stack != [:p, :hash, :inspect]
+ }, '[Bug #9940]'
end
end