diff --git a/test/ruby/test_eval.rb b/test/ruby/test_eval.rb index a6900e0..1fca931 100644 --- a/test/ruby/test_eval.rb +++ b/test/ruby/test_eval.rb @@ -415,4 +415,12 @@ class TestEval < Test::Unit::TestCase assert_raise(ArgumentError) {eval("__ENCODING__".encode("utf-32be"))} assert_raise(ArgumentError) {eval("__ENCODING__".encode("utf-32le"))} end + + def test_eval_with_binding_in_for + for i in [1] + a = eval('local_variables', binding) + end + + assert_equal ['i','a'], a + end end