aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_pack.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-29 09:40:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-10-29 09:40:38 +0000
commit3056933cc0b7c1d68ddda1a143bfa298a92f4a0c (patch)
treed4480a2402b6ab767caa07acbb37bf352712d9b6 /test/ruby/test_pack.rb
parent34c5cea9b52b7289b45ebc801a886ca8ecb613b2 (diff)
downloadruby-3056933cc0b7c1d68ddda1a143bfa298a92f4a0c.tar.gz
* test/ruby/test_array.rb (test_pack): use utf-8.
* test/ruby/test_pack.rb (test_pack_U): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r--test/ruby/test_pack.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 22b7b87580..2666bb0e90 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -51,9 +51,9 @@ class TestPack < Test::Unit::TestCase
assert_raise(RangeError) { [-0x40000000].pack("U") }
assert_raise(RangeError) { [-1].pack("U") }
assert_equal "\000", [0].pack("U")
- assert_equal "\374\277\277\277\277\277", [0x3fffffff].pack("U")
- assert_equal "\375\200\200\200\200\200", [0x40000000].pack("U")
- assert_equal "\375\277\277\277\277\277", [0x7fffffff].pack("U")
+ assert_equal "\374\277\277\277\277\277".force_encoding(Encoding::UTF_8), [0x3fffffff].pack("U")
+ assert_equal "\375\200\200\200\200\200".force_encoding(Encoding::UTF_8), [0x40000000].pack("U")
+ assert_equal "\375\277\277\277\277\277".force_encoding(Encoding::UTF_8), [0x7fffffff].pack("U")
assert_raise(RangeError) { [0x80000000].pack("U") }
assert_raise(RangeError) { [0x100000000].pack("U") }
end