summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-30 00:01:23 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-09-30 00:01:23 +0000
commit16759238ad5a19e784f73a66ba5cacf7ee274262 (patch)
treeaa0164af378353d944a1d1f61e74f2166133496d /test
parent623cf29787e8c798f711622450c748ac65f22cea (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index ec90193546..75da42eeef 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -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!