diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-21 12:56:48 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-21 12:56:48 +0000 |
| commit | d85267034f85756e07da25bc3584964c49f3a298 (patch) | |
| tree | a45b61004977fc8f10e1906bc4ad2c7f6a21595c /test | |
| parent | 8932916c81e367ee5b06fb697c3f1c6561bf2bc3 (diff) | |
| download | ruby-d85267034f85756e07da25bc3584964c49f3a298.tar.gz ruby-d85267034f85756e07da25bc3584964c49f3a298.tar.xz ruby-d85267034f85756e07da25bc3584964c49f3a298.zip | |
* ext/zlib/zlib.c (rb_gzwriter_write): conversion should be done
using to_str, not to_s.
* ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion
according to gz encoding.
* ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding
before unget.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/zlib/test_zlib.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 5746f036e..5a4a87a0f 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_s; "bar"; end + def o.to_str; "bar"; end Zlib::GzipWriter.open(t.path) {|gz| gz.print(o) } assert_equal("bar", Zlib::GzipReader.open(t.path) {|gz| gz.read }) end |
