diff options
Diffstat (limited to 'test/ruby/test_proc.rb')
-rw-r--r-- | test/ruby/test_proc.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 61f8d3b635..4cfbf9a1be 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -1251,6 +1251,11 @@ class TestProc < Test::Unit::TestCase binding end + def test_local_variables + b = get_binding + assert_equal(%i[if case when begin end a], b.local_variables) + end + def local_variables_of(bind) this_should_not_be_in_bind = 2 bind.local_variables |