Commit b752b01a authored by chasonr's avatar chasonr

Update the Fixnum#chr test for UTF-8.

parent 5e5ee841
......@@ -5,6 +5,11 @@ assert('Integer#chr') do
assert_equal("A", 65.chr)
assert_equal("B", 0x42.chr)
# multibyte encoding (not support yet)
assert_raise(RangeError) { 12345.chr }
if 255.chr.bytes == [195, 191] then
# UTF-8 gem is configured
assert_raise(RangeError) { 0x110000.chr }
else
# multibyte encoding (not support yet)
assert_raise(RangeError) { 256.chr }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment