mirror of
https://github.com/ruby/ruby.git
synced 2025-09-22 12:04:01 +02:00
pack.c: unpack "M" may be ASCII only
* pack.c (pack_unpack_internal): set ASCII only properly on "M", may be ASCII only. [ruby-core:83055] [Bug #13949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b455b8391d
commit
d35b5a4726
2 changed files with 10 additions and 3 deletions
|
@ -686,6 +686,11 @@ EXPECTED
|
|||
assert_equal(["pre=hoge"], "pre=hoge".unpack("M"))
|
||||
assert_equal(["pre==31after"], "pre==31after".unpack("M"))
|
||||
assert_equal(["pre===31after"], "pre===31after".unpack("M"))
|
||||
|
||||
bug = '[ruby-core:83055] [Bug #13949]'
|
||||
s = "abcdef".unpack1("M")
|
||||
assert_equal(Encoding::ASCII_8BIT, s.encoding)
|
||||
assert_predicate(s, :ascii_only?, bug)
|
||||
end
|
||||
|
||||
def test_pack_unpack_P2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue