mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
61b8250adc
commit
91538a3882
3 changed files with 9 additions and 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>
|
Wed Jun 5 22:40:42 2013 Shugo Maeda <shugo@ruby-lang.org>
|
||||||
|
|
||||||
* lib/net/imap.rb (capability_response): should ignore trailing
|
* lib/net/imap.rb (capability_response): should ignore trailing
|
||||||
|
|
2
string.c
2
string.c
|
@ -7624,7 +7624,7 @@ rb_str_b(VALUE str)
|
||||||
VALUE str2 = str_alloc(rb_cString);
|
VALUE str2 = str_alloc(rb_cString);
|
||||||
str_replace_shared_without_enc(str2, str);
|
str_replace_shared_without_enc(str2, str);
|
||||||
OBJ_INFECT(str2, str);
|
OBJ_INFECT(str2, str);
|
||||||
ENC_CODERANGE_SET(str2, ENC_CODERANGE_VALID);
|
ENC_CODERANGE_CLEAR(str2);
|
||||||
return str2;
|
return str2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1488,6 +1488,8 @@ class TestM17N < Test::Unit::TestCase
|
||||||
assert_equal(true, s.b.tainted?)
|
assert_equal(true, s.b.tainted?)
|
||||||
s.untrust
|
s.untrust
|
||||||
assert_equal(true, s.b.untrusted?)
|
assert_equal(true, s.b.untrusted?)
|
||||||
|
s = "abc".b
|
||||||
|
assert_equal(true, s.b.ascii_only?)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_scrub
|
def test_scrub
|
||||||
|
|
Loading…
Reference in a new issue