diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_settracefunc.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index b0c6f2bcca..cfb06010ef 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -941,4 +941,22 @@ class TestSetTraceFunc < Test::Unit::TestCase end assert_security_error_safe4(func) end + + def test_trace_point_binding_in_ifunc + assert_normal_exit %q{ + tp = TracePoint.new(:raise) do |tp| + tp.binding + end + tp.enable do + obj = Object.new + class << obj + include Enumerable + def each + yield 1 + end + end + obj.zip({}) {} + end + }, '[ruby-dev:46908] [ruby-trunk - Bug #7774]' + end end |