Skip to content

Commit

Permalink
* ext/zlib/zlib.c: [DOC] Remove default value of Zlib constants, as
Browse files Browse the repository at this point in the history
  they may change in the implementation without notice. Patched by
  @robin850 [Fixes rubyGH-682] ruby#682


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
zzak committed Jul 27, 2014
1 parent 62d3b57 commit 1b92509
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Mon Jul 28 04:39:58 2014 Zachary Scott <e@zzak.io>

* ext/zlib/zlib.c: [DOC] Remove default value of Zlib constants, as
they may change in the implementation without notice. Patched by
@robin850 [Fixes GH-682] https://github.com/ruby/ruby/pull/682

Mon Jul 28 04:35:35 2014 Zachary Scott <e@zzak.io>

* ext/openssl/ossl_hmac.c: Fix NO_HMAC warning [Fixes GH-665]
Expand Down
14 changes: 8 additions & 6 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1463,13 +1463,15 @@ rb_deflate_s_allocate(VALUE klass)
* the default value of that argument is used.
*
* The +level+ sets the compression level for the deflate stream between 0 (no
* compression) and 9 (best compression. The following constants have been
* compression) and 9 (best compression). The following constants have been
* defined to make code more readable:
*
* * Zlib::NO_COMPRESSION = 0
* * Zlib::BEST_SPEED = 1
* * Zlib::DEFAULT_COMPRESSION = 6
* * Zlib::BEST_COMPRESSION = 9
* * Zlib::DEFAULT_COMPRESSION
* * Zlib::NO_COMPRESSION
* * Zlib::BEST_SPEED
* * Zlib::BEST_COMPRESSION
*
* See http://www.zlib.net/manual.html#Constants for further information.
*
* The +window_bits+ sets the size of the history buffer and should be between
* 8 and 15. Larger values of this parameter result in better compression at
Expand Down Expand Up @@ -1591,7 +1593,7 @@ deflate_run(VALUE args)
*
* Compresses the given +string+. Valid values of level are
* Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION,
* Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9 (the default is 6).
* Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9.
*
* This method is almost equivalent to the following code:
*
Expand Down

0 comments on commit 1b92509

Please sign in to comment.