From 16549e33da58396d243234e5880f4f1dae6ab339 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 21 Oct 2008 14:14:13 +0000 Subject: * ext/stringio/stringio.c (strio_write): should convert writing string to the encoding of the buffer. * hash.c (rb_any_hash): typo fixed. * ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion need to be done by to_s. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/zlib/test_zlib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 5a4a87a0fb..5746f036ea 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -597,7 +597,7 @@ if defined? Zlib assert_equal("foo", Zlib::GzipReader.open(t.path) {|gz| gz.read }) o = Object.new - def o.to_str; "bar"; end + def o.to_s; "bar"; end Zlib::GzipWriter.open(t.path) {|gz| gz.print(o) } assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read }) end -- cgit v1.2.3