diff options
Diffstat (limited to 'bootstraptest/test_proc.rb')
| -rw-r--r-- | bootstraptest/test_proc.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/bootstraptest/test_proc.rb b/bootstraptest/test_proc.rb index c23394e8d2..637603243d 100644 --- a/bootstraptest/test_proc.rb +++ b/bootstraptest/test_proc.rb @@ -224,19 +224,6 @@ assert_equal %q{[[nil, []], [1, []], [1, [2]], [1, [2, 3]]]}, %q{ Proc.new{|a, *b| [a, b]}.call(1, 2, 3), ] } -assert_equal %q{0}, %q{ - pr = proc{ - $SAFE - } - $SAFE = 1 - pr.call -} -assert_equal %q{[1, 0]}, %q{ - pr = proc{ - $SAFE += 1 - } - [pr.call, $SAFE] -} assert_equal %q{1}, %q{ def m(&b) b @@ -380,8 +367,8 @@ assert_equal 'ok', %q{ assert_equal 'ok', %q{ class Foo - def call_it - p = Proc.new + def call_it(&block) + p = Proc.new(&block) p.call end end |
