diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | string.c | 2 | ||||
-rw-r--r-- | test/ruby/test_m17n.rb | 2 |
3 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Thu Jun 6 00:05:08 2013 Akinori MUSHA <knu@iDaemons.org> + + * string.c (String#b): Allow code range scan to happen later so + ascii_only? on a result string returns the correct value. + [ruby-core:55315] [Bug #8496] + Wed Jun 5 22:40:42 2013 Shugo Maeda <shugo@ruby-lang.org> * lib/net/imap.rb (capability_response): should ignore trailing @@ -7624,7 +7624,7 @@ rb_str_b(VALUE str) VALUE str2 = str_alloc(rb_cString); str_replace_shared_without_enc(str2, str); OBJ_INFECT(str2, str); - ENC_CODERANGE_SET(str2, ENC_CODERANGE_VALID); + ENC_CODERANGE_CLEAR(str2); return str2; } diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 98f79b3f76..edc8e4c28f 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1488,6 +1488,8 @@ class TestM17N < Test::Unit::TestCase assert_equal(true, s.b.tainted?) s.untrust assert_equal(true, s.b.untrusted?) + s = "abc".b + assert_equal(true, s.b.ascii_only?) end def test_scrub |