mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
is invalid. [Feature #5855] [Bug #5863] [Bug #5864] * string.c (rb_str_concat): ditto. * string.c (rb_str_concat): set encoding as ASCII-8BIT when the string is US-ASCII and the argument is an integer greater than 127. * regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code. * enc/euc_jp.c (code_to_mbclen): ditto. * enc/shift_jis.c (code_to_mbclen): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5393622dad
commit
800f04c6a5
9 changed files with 79 additions and 20 deletions
|
@ -22,6 +22,6 @@ class TestShiftJIS < Test::Unit::TestCase
|
|||
s = "あいうえお"
|
||||
s << 0x82a9
|
||||
assert_equal("あいうえおか", s)
|
||||
assert_raise(ArgumentError) { s << 0x82 }
|
||||
assert_raise(RangeError) { s << 0x82 }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue