diff options
Diffstat (limited to 'sample/test.rb')
-rw-r--r-- | sample/test.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index 4cbddabfbf..a9940039cd 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -2178,6 +2178,15 @@ end test_ok(File.expand_path(".", "//") == "//") test_ok(File.expand_path("sub", "//") == "//sub") +# test_check "Proc#binding" +ObjectSpace.each_object(Proc){|o| + begin + b = o.binding + eval 'self', b + rescue ArgumentError + end +} + test_check "gc" begin 1.upto(10000) { @@ -2209,6 +2218,7 @@ test_ok true # reach here or dumps core ObjectSpace.each_object{|o| o.class.name } + test_ok true # reach here or dumps core if $failed > 0 |