From e796e95ec84b85c4885a15b6b6b46c6689d31444 Mon Sep 17 00:00:00 2001 From: mame Date: Sat, 6 Mar 2010 04:52:31 +0000 Subject: * io.c (rb_io_s_write, rb_io_s_binwrite): delete File#write and #binwrite. It may take a long time to make them stable, so 1.9.2 should not include them. We need refactoring to implement them again. * test/ruby/test_io.rb: delete tests for them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index cab270d447..5fc3b133dd 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1512,34 +1512,4 @@ End t.close assert_raise(IOError) {t.binmode} end - - def test_s_write - t = Tempfile.new("foo") - path = t.path - t.close(false) - File.write(path, "foo\nbar\nbaz") - assert_equal("foo\nbar\nbaz", File.read(path)) - File.write(path, "FOO", 0) - assert_equal("FOO\nbar\nbaz", File.read(path)) - File.write(path, "BAR") - assert_equal("BAR", File.read(path)) - File.write(path, "\u{3042}", mode: "w", encoding: "EUC-JP") - assert_equal("\u{3042}".encode("EUC-JP"), File.read(path, encoding: "EUC-JP")) - t.unlink - end - - def test_s_binwrite - t = Tempfile.new("foo") - path = t.path - t.close(false) - File.binwrite(path, "foo\nbar\nbaz") - assert_equal("foo\nbar\nbaz", File.read(path)) - File.binwrite(path, "FOO", 0) - assert_equal("FOO\nbar\nbaz", File.read(path)) - File.binwrite(path, "BAR") - assert_equal("BAR", File.read(path)) - File.binwrite(path, "\u{3042}") - assert_equal("\u{3042}", File.read(path)) - t.unlink - end end -- cgit v1.2.3