From 16759238ad5a19e784f73a66ba5cacf7ee274262 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 30 Sep 2017 00:01:23 +0000 Subject: 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 --- test/ruby/test_string.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/ruby/test_string.rb') 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! -- cgit v1.2.3