diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 13:22:48 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 13:22:48 +0000 |
commit | 0d0636d22ce7bd4729d749ca36cf2cde5175d815 (patch) | |
tree | 083083af8310832b9a0cf94c004682751bfe18dd /string.c | |
parent | 7decd09b6265031144cebd5279061c05447e1c8c (diff) |
merges r29848 and r29852 from trunk into ruby_1_9_2.
--
* string.c (rb_str_concat): set ENC_CODERANGE_VALID when the
receiver is 7BIT and the argument is non ASCII.
--
Fix r29848's test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2026,6 +2026,8 @@ rb_str_concat(VALUE str1, VALUE str2) } rb_str_resize(str1, pos+len); rb_enc_mbcput(lc, RSTRING_PTR(str1)+pos, enc); + if (cr == ENC_CODERANGE_7BIT && lc > 127) + cr = ENC_CODERANGE_VALID; ENC_CODERANGE_SET(str1, cr); return str1; } |