mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/zlib/zlib.c (gzfile_wrap): Document encoding options.
* ext/zlib/zlib.c (rb_gzwriter_s_open): ditto * ext/zlib/zlib.c (rb_gzreader_s_open): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2f14f572d
commit
88cff367f4
2 changed files with 32 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Aug 9 09:18:04 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (gzfile_wrap): Document encoding options.
|
||||||
|
* ext/zlib/zlib.c (rb_gzwriter_s_open): ditto
|
||||||
|
* ext/zlib/zlib.c (rb_gzreader_s_open): ditto
|
||||||
|
|
||||||
Sun Aug 7 23:31:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
Sun Aug 7 23:31:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
|
* time.c (rb_strftime_alloc): raise ERANGE if width is too large.
|
||||||
|
|
|
@ -2762,14 +2762,17 @@ gzfile_wrap(int argc, VALUE *argv, VALUE klass, int close_io_on_error)
|
||||||
/*
|
/*
|
||||||
* Document-method: Zlib::GzipFile.wrap
|
* Document-method: Zlib::GzipFile.wrap
|
||||||
*
|
*
|
||||||
* call-seq: Zlib::GzipFile.wrap(io) { |gz| ... }
|
* call-seq:
|
||||||
|
* Zlib::GzipReader.wrap(io, ...) { |gz| ... }
|
||||||
|
* Zlib::GzipWriter.wrap(io, ...) { |gz| ... }
|
||||||
*
|
*
|
||||||
* Creates a GzipFile object associated with +io+, and
|
* Creates a GzipReader or GzipWriter associated with +io+, passing in any
|
||||||
* executes the block with the newly created GzipFile object,
|
* necessary extra options, and executes the block with the newly created
|
||||||
* just like File.open. The GzipFile object will be closed
|
* object just like File.open.
|
||||||
* automatically after executing the block. If you want to keep
|
*
|
||||||
* the associated IO object opening, you may call
|
* The GzipFile object will be closed automatically after executing the block.
|
||||||
* +Zlib::GzipFile#finish+ method in the block.
|
* If you want to keep the associated IO object open, you may call
|
||||||
|
* Zlib::GzipFile#finish method in the block.
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_gzfile_s_wrap(int argc, VALUE *argv, VALUE klass)
|
rb_gzfile_s_wrap(int argc, VALUE *argv, VALUE klass)
|
||||||
|
@ -3187,12 +3190,17 @@ rb_gzwriter_s_open(int argc, VALUE *argv, VALUE klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq: Zlib::GzipWriter.new(io, level, strategy)
|
* call-seq:
|
||||||
|
* Zlib::GzipWriter.new(io, level = nil, strategy = nil, options = {})
|
||||||
*
|
*
|
||||||
* Creates a GzipWriter object associated with +io+. +level+ and +strategy+
|
* Creates a GzipWriter object associated with +io+. +level+ and +strategy+
|
||||||
* should be the same as the arguments of Zlib::Deflate.new. The GzipWriter
|
* should be the same as the arguments of Zlib::Deflate.new. The GzipWriter
|
||||||
* object writes gzipped data to +io+. At least, +io+ must respond to the
|
* object writes gzipped data to +io+. +io+ must respond to the
|
||||||
* +write+ method that behaves same as write method in IO class.
|
* +write+ method that behaves the same as IO#write.
|
||||||
|
*
|
||||||
|
* The +options+ hash may be used to set the encoding of the data.
|
||||||
|
* +:external_encoding+, +:internal_encoding+ and +:encoding+ may be set as in
|
||||||
|
* IO::new.
|
||||||
*/
|
*/
|
||||||
static VALUE
|
static VALUE
|
||||||
rb_gzwriter_initialize(int argc, VALUE *argv, VALUE obj)
|
rb_gzwriter_initialize(int argc, VALUE *argv, VALUE obj)
|
||||||
|
@ -3388,11 +3396,16 @@ rb_gzreader_s_open(int argc, VALUE *argv, VALUE klass)
|
||||||
/*
|
/*
|
||||||
* Document-method: Zlib::GzipReader.new
|
* Document-method: Zlib::GzipReader.new
|
||||||
*
|
*
|
||||||
* call-seq: Zlib::GzipReader.new(io)
|
* call-seq:
|
||||||
|
* Zlib::GzipReader.new(io, options = {})
|
||||||
*
|
*
|
||||||
* Creates a GzipReader object associated with +io+. The GzipReader object reads
|
* Creates a GzipReader object associated with +io+. The GzipReader object reads
|
||||||
* gzipped data from +io+, and parses/decompresses them. At least, +io+ must have
|
* gzipped data from +io+, and parses/decompresses it. The +io+ must
|
||||||
* a +read+ method that behaves same as the +read+ method in IO class.
|
* have a +read+ method that behaves same as the IO#read.
|
||||||
|
*
|
||||||
|
* The +options+ hash may be used to set the encoding of the data.
|
||||||
|
* +:external_encoding+, +:internal_encoding+ and +:encoding+ may be set as in
|
||||||
|
* IO::new.
|
||||||
*
|
*
|
||||||
* If the gzip file header is incorrect, raises an Zlib::GzipFile::Error
|
* If the gzip file header is incorrect, raises an Zlib::GzipFile::Error
|
||||||
* exception.
|
* exception.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue