diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-14 15:47:51 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-14 15:47:51 +0000 |
commit | 711f429d0215b364916f7f171981ea85059bcbcf (patch) | |
tree | 98c730cc0a193fb2ec9fbe193e42f5fd496c1539 /test | |
parent | a8f4f3c2d1aaf18f64905c0a15bab5219b7b301a (diff) | |
download | ruby-711f429d0215b364916f7f171981ea85059bcbcf.tar.gz ruby-711f429d0215b364916f7f171981ea85059bcbcf.tar.xz ruby-711f429d0215b364916f7f171981ea85059bcbcf.zip |
* re.c (rb_reg_search): make search reentrant. [ruby-dev:34223]
* test/ruby/test_parse.rb (TestParse::test_global_variable):
should preserve $& variable.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 |