aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-11 06:13:02 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-11 06:13:02 +0000
commit38b37f7311e8f77aad009ae84b2fe866db421fc4 (patch)
treea6936fdb83df3abd6e665cedec2c705391f955ed
parent3300cb536c83d7db0e2be57e76ea026cf5834df7 (diff)
downloadruby-38b37f7311e8f77aad009ae84b2fe866db421fc4.tar.gz
fix Zlib.gzip/gunzip document
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/zlib/zlib.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 232ad0b13b..4052e49b4b 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -4278,21 +4278,25 @@ zlib_gzip_end(struct gzfile *gz)
/*
* call-seq:
- * Zlib.gunzip(src) -> String
+ * Zlib.gzip(src, level=nil, strategy=nil) -> String
*
- * Decode the given gzipped +string+.
+ * Gzip the given +string+. Valid values of level are
+ * Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION,
+ * Zlib::DEFAULT_COMPRESSION (default), or an integer from 0 to 9.
*
* This method is almost equivalent to the following code:
*
- * def gunzip(string)
- * sio = StringIO.new(string)
- * gz = Zlib::GzipReader.new(sio, encoding: Encoding::ASCII_8BIT)
- * gz.read
- * ensure
- * gz&.close
+ * def gzip(string, level=nil, strategy=nil)
+ * sio = StringIO.new
+ * sio.binmode
+ * gz = Zlib::GzipWriter.new(sio, level, strategy)
+ * gz.write(string)
+ * gz.close
+ * sio.string
* end
*
- * See also Zlib.gzip
+ * See also Zlib.gunzip
+ *
*/
static VALUE
zlib_s_gzip(int argc, VALUE *argv, VALUE klass)
@@ -4334,25 +4338,21 @@ zlib_gunzip_end(struct gzfile *gz)
/*
* call-seq:
- * Zlib.gunzip(src, level=nil, strategy=nil) -> String
+ * Zlib.gunzip(src) -> String
*
- * Gzip the given +string+. Valid values of level are
- * Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION,
- * Zlib::DEFAULT_COMPRESSION (default), or an integer from 0 to 9.
+ * Decode the given gzipped +string+.
*
* This method is almost equivalent to the following code:
*
- * def gzip(string, level=nil, strategy=nil)
- * sio = StringIO.new
- * sio.binmode
- * gz = Zlib::GzipWriter.new(sio, level, strategy)
- * gz.write(string)
- * gz.close
- * sio.string
+ * def gunzip(string)
+ * sio = StringIO.new(string)
+ * gz = Zlib::GzipReader.new(sio, encoding: Encoding::ASCII_8BIT)
+ * gz.read
+ * ensure
+ * gz&.close
* end
*
- * See also Zlib.gunzip
- *
+ * See also Zlib.gzip
*/
static VALUE
zlib_gunzip(VALUE klass, VALUE src)