diff --git a/ChangeLog b/ChangeLog index 4c3e324051..1c9b1e8794 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Sep 1 10:20:50 2011 NAKAMURA Usaku + + * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish, + default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test + committed in r33144. I'd misunderstood the spec of ruby's universal + newline. + Thu Sep 1 09:27:57 2011 NARUSE, Yui * variable.c (rb_autoloading_value) Fix the order of definitions. diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 01dca47f7f..f62ded90cb 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -2072,29 +2072,29 @@ EOT def test_default_mode_on_dosish with_tmpdir { - open("a", "w") {|f| f.puts} + open("a", "w") {|f| f.write "\n"} assert_equal("\r\n", IO.binread("a")) } end if /mswin|mingw/ =~ RUBY_PLATFORM def test_default_mode_on_unix with_tmpdir { - open("a", "w") {|f| f.puts} + open("a", "w") {|f| f.write "\n"} assert_equal("\n", IO.binread("a")) } end unless /mswin|mingw/ =~ RUBY_PLATFORM def test_text_mode with_tmpdir { - open("a", "wt") {|f| f.puts} - assert_equal("\r\n", IO.binread("a")) + open("a", "wb") {|f| f.write "\r\n"} + assert_equal("\n", open("a", "rt"){|f| f.read}) } end def test_binary_mode with_tmpdir { - open("a", "wb") {|f| f.puts} - assert_equal("\n", IO.binread("a")) + open("a", "wb") {|f| f.write "\r\n"} + assert_equal("\r\n", open("a", "rb"){|f| f.read}) } end end