summaryrefslogtreecommitdiff
path: root/test/ruby/test_m17n_comb.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-20 09:10:12 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-20 09:10:12 +0000
commit42bf89945890b04ee11e5128d2db34cb3dd0b5a4 (patch)
treeaa40f18385130e5f4fc91a7c8f68e0924255e8d8 /test/ruby/test_m17n_comb.rb
parent3a20287053640a97896f701f264f8a0fccec7c6a (diff)
* string.c (rb_str_succ): add missing case NEIGHBOR_WRAPPED.
r42078 caused buggy behavior like "\xFF".b -> "\x01\xFF".b git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n_comb.rb')
-rw-r--r--test/ruby/test_m17n_comb.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_m17n_comb.rb b/test/ruby/test_m17n_comb.rb
index 47a1f411c6..8069885793 100644
--- a/test/ruby/test_m17n_comb.rb
+++ b/test/ruby/test_m17n_comb.rb
@@ -1340,6 +1340,11 @@ class TestM17NComb < Test::Unit::TestCase
end
end
+ def test_str_succ2
+ assert_equal("\x01\x00".force_encoding("US-ASCII"), "\x7f".force_encoding("US-ASCII").succ)
+ assert_equal("\x01\x00".b, "\xff".b.succ)
+ end
+
def test_str_hash
combination(STRINGS, STRINGS) {|s1, s2|
if s1.eql?(s2)