diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-31 13:30:15 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-31 13:30:15 +0000 |
commit | 3f59416771559b168e2e5e0cdbcde86d7aea666d (patch) | |
tree | 724a0b82ca0e227bd73961d634d297dcd9702d4d /test | |
parent | 4e2989ee8f53d421e9fef21df67420629285b357 (diff) |
merge revision(s) 60066: [Backport #13952]
string.c: fix ASCII-only on succ
* string.c (str_succ): clear coderange cache when no alpha-numeric
character case, carried part may become ASCII-only.
[ruby-core:83062] [Bug #13952]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 61a69b1c7b..a0584e26bf 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1540,6 +1540,11 @@ class TestString < Test::Unit::TestCase assert_equal("2000aaa", "1999zzz".succ) assert_equal("AAAA0000", "ZZZ9999".succ) assert_equal("**+", "***".succ) + + bug = '[ruby-core:83062] [Bug #13952]' + s = "\xff".b + assert_not_predicate(s, :ascii_only?) + assert_predicate(s.succ, :ascii_only?, bug) end def test_succ! |