diff options
Diffstat (limited to 'test/ruby/test_syntax.rb')
| -rw-r--r-- | test/ruby/test_syntax.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index edf5886a53..1a5c538050 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -1930,12 +1930,15 @@ eom 1.times do [ assert_equal(0, it), - assert_equal([:a], eval('[:a].map{it}')), - assert_raise(NameError) {eval('it')}, + assert_equal([0], eval('[:a].map{it}')), + assert_equal(0, eval('it')), ] end assert_valid_syntax('proc {def foo(_);end;it}') assert_syntax_error('p { [it **2] }', /unexpected \*\*/) + + b = proc {it; binding}.call + assert_include(b.local_variables, :it) end def test_value_expr_in_condition |
