diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-13 05:50:54 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-13 05:50:54 +0000 |
commit | ca768eb4eef088b91d38dbf3d98029ff84b29050 (patch) | |
tree | b61a601c5cc4639edd1195e670afe7a4e3c897db /test | |
parent | ff5354c2949120d5ee8b623fa500559c91ca5cdc (diff) | |
download | ruby-ca768eb4eef088b91d38dbf3d98029ff84b29050.tar.gz |
regexec.c: invalidate previously matched position
* regexec.c (match_at): invalidate end position not yet matched
when new start position is pushed, to dispose previously stored
position. [ruby-core:83743] [Bug #14101]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_regexp.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index d17a125444..85d5b2cdfe 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1238,6 +1238,9 @@ class TestRegexp < Test::Unit::TestCase assert_equal(0, /\/\*((?~\*\/))\*\// =~ "/*abc*def/xyz*/ /* */") assert_equal("abc*def/xyz", $1) + + assert_equal(0, /(?~(a)c)/ =~ "abb") + assert_nil($1) end # This assertion is for porting x2() tests in testpy.py of Onigmo. |