summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_io_m17n.rb4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 701e03144..378e2a07f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Dec 25 13:23:13 2007 Tanaka Akira <akr@fsij.org>
+
+ * test/ruby/test_io_m17n.rb (test_write_noenc): don't mix text and
+ binary mode. [ruby-dev:32743]
+
Tue Dec 25 13:13:09 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* README.EXT.ja, dir.c, eval.c, eval_intern.h, lex.c.src,
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb
index e90d1dd91..d3de901f6 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)
}
}