summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_io_m17n.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index e90d1dd916..d3de901f6f 100644
--- a/test/ruby/test_io_m17n.rb
+++ b/test/ruby/test_io_m17n.rb
@@ -300,14 +300,14 @@ EOT
end
def test_write_noenc
- src = "\xc2\xa1\n"
+ src = "\xc2\xa1\n".force_encoding("ascii-8bit")
with_tmpdir {
open('tmp', "w") {|f|
ENCS.each {|enc|
f.write src.dup.force_encoding(enc)
}
}
- open('tmp', 'rb') {|f|
+ open('tmp', 'r:ascii-8bit') {|f|
assert_equal(src*ENCS.length, f.read)
}
}