mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
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
This commit is contained in:
parent
0c467565ca
commit
24d38cc447
2 changed files with 4 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue