diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_proc.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb index 3d347004ea..dfe89033d8 100644 --- a/bootstraptest/test_proc.rb +++ b/bootstraptest/test_proc.rb @@ -456,3 +456,27 @@ assert_equal 'ok', %q{ end } +assert_equal 'ok', %q{ + def x + binding + end + b = x{|a| a } + b.eval('yield("ok")') +}, '[Bug #5634]' + +assert_equal 'ok', %q{ + def x + binding + end + eval("x { 'ok' }").eval "yield" +}, '[Bug #5634]' + +assert_equal 'ok', %q{ + def x + binding + end + def m + x{ 'ok' } + end + eval('yield', m) +}, '[Bug #5634]' |