diff options
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r-- | test/ruby/test_proc.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index fa247f2fc0..b67773b7f8 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1321,4 +1321,24 @@ class TestProc < Test::Unit::TestCase def obj.b; binding; end assert_same(obj, obj.b.receiver, feature8779) end + + def test_proc_mark + assert_normal_exit(<<-'EOS') + def f + Enumerator.new{ + 100000.times {|i| + yield + s = "#{i}" + } + } + end + + def g + x = proc{} + f(&x) + end + e = g + e.each {} + EOS + end end |