diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-14 05:03:22 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-01-14 05:03:22 +0000 |
commit | 2dbf7d11f2df4a4f4f40ff7b688097ede497cb35 (patch) | |
tree | fe8daf34665c933fc861726323b650da76f994cc /pack.c | |
parent | a2e9ec244e1c1b6355b9404f9573c6de44ff9e1a (diff) | |
download | ruby-2dbf7d11f2df4a4f4f40ff7b688097ede497cb35.tar.gz |
* pack.c (pack_unpack): the resulted string of unpack('M') must have
ASCII-8BIT encoding (and ENC_CODERANGE_VALID). [ruby-core:34482]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2024,7 +2024,7 @@ pack_unpack(VALUE str, VALUE fmt) s++; } rb_str_set_len(buf, ptr - RSTRING_PTR(buf)); - ENCODING_CODERANGE_SET(buf, rb_usascii_encindex(), ENC_CODERANGE_7BIT); + ENCODING_CODERANGE_SET(buf, rb_ascii8bit_encindex(), ENC_CODERANGE_VALID); UNPACK_PUSH(buf); } break; |