Test for UTF-8 as mattn suggests.

The string is "Hello world" in Japanese.  (hat tip:  Google Translate.)
This commit is contained in:
chasonr
2014-02-27 23:42:07 -05:00
parent b752b01a56
commit d60944ef3a
+1 -1
View File
@@ -5,7 +5,7 @@ assert('Integer#chr') do
assert_equal("A", 65.chr)
assert_equal("B", 0x42.chr)
if 255.chr.bytes == [195, 191] then
if "こんにちわ世界".size == 7 then
# UTF-8 gem is configured
assert_raise(RangeError) { 0x110000.chr }
else