diff options
Diffstat (limited to 'test/ruby/test_parse.rb')
| -rw-r--r-- | test/ruby/test_parse.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 7aaa17253..125af1fa3 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -670,8 +670,11 @@ x = __ENCODING__ def test_global_variable assert_equal(nil, eval('$-x')) + assert_equal(nil, eval('alias $preserve_last_match $&')) assert_equal(nil, eval('alias $& $test_parse_foobarbazqux')) $test_parse_foobarbazqux = nil + assert_equal(nil, $&) + assert_equal(nil, eval('alias $& $preserve_last_match')) assert_raise(SyntaxError) { eval('$#') } end |
