mirror of
https://github.com/ruby/ruby.git
synced 2025-08-25 05:55:46 +02:00
re.c: char boundary
* re.c (rb_reg_match_m_p): consider char boundary. rb_str_subpos does not adjust to the boundary if len == 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7e8b910a56
commit
2800e6a0a4
2 changed files with 4 additions and 3 deletions
|
@ -543,7 +543,8 @@ class TestRegexp < Test::Unit::TestCase
|
|||
assert_equal(true, /../.match?('abc', -2))
|
||||
assert_equal(false, /../.match?("abc", -4))
|
||||
assert_equal(false, /../.match?("abc", 4))
|
||||
assert_equal(true, /../n.match?("\u3042" + '\x', 1))
|
||||
assert_equal(true, /../.match?("\u3042xx", 1))
|
||||
assert_equal(false, /../.match?("\u3042x", 1))
|
||||
assert_equal(true, /\z/.match?(""))
|
||||
assert_equal(true, /\z/.match?("abc"))
|
||||
assert_equal(true, /R.../.match?("Ruby"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue