mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
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/trunk@60066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
623cf29787
commit
16759238ad
2 changed files with 6 additions and 0 deletions
|
@ -1872,6 +1872,11 @@ CODE
|
|||
|
||||
assert_equal("!", " ".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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue