diff options
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r-- | test/ruby/test_variable.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb index 349cb05ae7..601fc21c74 100644 --- a/test/ruby/test_variable.rb +++ b/test/ruby/test_variable.rb @@ -59,4 +59,11 @@ class TestVariable < Test::Unit::TestCase lvar = 1 assert_instance_of(Symbol, local_variables[0], "[ruby-dev:34008]") end + + def test_local_variables2 + x = 1 + proc do |y| + assert_equal([:x, :y], local_variables.sort) + end.call + end end |