1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* string.c (count_utf8_lead_bytes_with_ulong): fix shift size.

[ruby-dev:33993]

* string.c (str_utf8_nth) fix wrong counting.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-03-05 19:34:15 +00:00
parent 579f16d985
commit 98cbcf1bd7
4 changed files with 28 additions and 14 deletions

View file

@ -123,6 +123,8 @@ class TestRegexp < Test::Unit::TestCase
r = /./
m = r.match("a")
assert_equal(r, m.regexp)
re = /foo/
assert_equal(re, re.match("foo").regexp)
end
def test_source
@ -188,11 +190,6 @@ class TestRegexp < Test::Unit::TestCase
assert_equal(/foo/, m.dup.regexp)
end
def test_match_regexp
re = /foo/
assert_equal(re, re.match("foo").regexp)
end
def test_match_size
m = /(.)(.)(\d+)(\d)/.match("THX1138.")
assert_equal(5, m.size)