diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 06:19:21 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-29 06:19:21 +0000 |
| commit | 8c2372933098e73a549e0c8ce7c9edc94c03e38a (patch) | |
| tree | 1387dc138321fdc44b90cddcb87609889966d229 /test/ruby | |
| parent | 6fcc9bd4dd149487ba883a26537408e97c382224 (diff) | |
| download | ruby-8c2372933098e73a549e0c8ce7c9edc94c03e38a.tar.gz ruby-8c2372933098e73a549e0c8ce7c9edc94c03e38a.tar.xz ruby-8c2372933098e73a549e0c8ce7c9edc94c03e38a.zip | |
* string.c (rb_str_rpartition): calculation was done in byte indexing.
* test/ruby/test_m17n_comb.rb (TestM17NComb::test_str_start_with):
allow start_with? matching on broken strings.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_m17n_comb.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb index 1b4f504f3..b3a5bfdc5 100644 --- a/test/ruby/test_m17n_comb.rb +++ b/test/ruby/test_m17n_comb.rb @@ -1563,6 +1563,8 @@ class TestM17NComb < Test::Unit::TestCase assert_raise(ArgumentError, desc) { s1.start_with?(s2) } next end + s1 = s1.dup.force_encoding("ASCII-8BIT") + s2 = s2.dup.force_encoding("ASCII-8BIT") if s1.length < s2.length assert_equal(false, enccall(s1, :start_with?, s2), desc) next |
