summaryrefslogtreecommitdiff
path: root/test/ruby/test_io.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r--test/ruby/test_io.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb
index 313fc0c864..4f2f40044b 100644
--- a/test/ruby/test_io.rb
+++ b/test/ruby/test_io.rb
@@ -536,7 +536,7 @@ class TestIO < Test::Unit::TestCase
with_pipe {|r, w|
w << "xyz"
w.close
- File.open("fom", "w+") {|f|
+ File.open("fom", "w+b") {|f|
f.write "abcd\n"
f.rewind
assert_equal("abc", f.read(3))
@@ -773,6 +773,7 @@ class TestIO < Test::Unit::TestCase
def make_tempfile
t = Tempfile.new("foo")
+ t.binmode
t.puts "foo"
t.puts "bar"
t.puts "baz"