aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_variable.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_variable.rb')
-rw-r--r--test/ruby/test_variable.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_variable.rb b/test/ruby/test_variable.rb
index 32b3d61573..321cd7e4c5 100644
--- a/test/ruby/test_variable.rb
+++ b/test/ruby/test_variable.rb
@@ -83,6 +83,17 @@ class TestVariable < Test::Unit::TestCase
end.call
end
+ def local_variables_of(bind)
+ this_should_not_be_in_bind = 2
+ bind.local_variables
+ end
+
+ def test_local_variables_from_other_method_binding
+ feature8773 = '[Feature #8773]'
+ x = 1
+ assert_equal([:x], local_variables_of(binding), feature8773)
+ end
+
def test_global_variable_0
assert_in_out_err(["-e", "$0='t'*1000;print $0"], "", /\At+\z/, [])
end