diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-23 07:06:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-23 07:06:12 +0000 |
commit | 585cbf65351ca10ebe673fefac22fdb9864779eb (patch) | |
tree | 3d2afa50d4599f14242a6492b8e6bfaaccb75412 /test/zlib | |
parent | cf4351f82a8e7ea18b351c9d06b0ea76fb6d0d85 (diff) |
zlib.c: multiple arguments to write
* ext/zlib/zlib.c (rb_gzwriter_write): accepts multiple arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/zlib')
-rw-r--r-- | test/zlib/test_zlib.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 2d539dda1a..c464bb214f 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -1057,6 +1057,14 @@ if defined? Zlib } end + def test_puts + Tempfile.create("test_zlib_gzip_writer_puts") {|t| + t.close + Zlib::GzipWriter.open(t.path) {|gz| gz.puts("foo") } + assert_equal("foo\n", Zlib::GzipReader.open(t.path) {|gz| gz.read }) + } + end + def test_writer_wrap Tempfile.create("test_zlib_gzip_writer_wrap") {|t| t.binmode |