summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/stringio/test_stringio.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb
index 4d1fdf28d1..01bdbaa6d1 100644
--- a/test/stringio/test_stringio.rb
+++ b/test/stringio/test_stringio.rb
@@ -384,9 +384,12 @@ class TestStringIO < Test::Unit::TestCase
end
def test_read
- f = StringIO.new("1234")
+ f = StringIO.new("\u3042\u3044")
assert_raise(ArgumentError) { f.read(-1) }
assert_raise(ArgumentError) { f.read(1, 2, 3) }
+ assert_equal("\u3042\u3044", f.read)
+ f.rewind
+ assert_equal("\u3042\u3044".force_encoding(Encoding::ASCII_8BIT), f.read(f.size))
end
def test_size