summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_proc.rb5
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