[前][次][番号順一覧][スレッド一覧]

ruby-changes:34893

From: zzak <ko1@a...>
Date: Mon, 28 Jul 2014 04:41:29 +0900 (JST)
Subject: [ruby-changes:34893] zzak:r46976 (trunk): * ext/zlib/zlib.c: [DOC] Remove default value of Zlib constants, as

zzak	2014-07-28 04:41:22 +0900 (Mon, 28 Jul 2014)

  New Revision: 46976

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46976

  Log:
    * 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

  Modified files:
    trunk/ChangeLog
    trunk/ext/zlib/zlib.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 46975)
+++ ChangeLog	(revision 46976)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Mon Jul 28 04:39:58 2014  Zachary Scott  <e@z...>
+
+	* 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@z...>
 
 	* ext/openssl/ossl_hmac.c: Fix NO_HMAC warning [Fixes GH-665]
Index: ext/zlib/zlib.c
===================================================================
--- ext/zlib/zlib.c	(revision 46975)
+++ ext/zlib/zlib.c	(revision 46976)
@@ -1463,13 +1463,15 @@ rb_deflate_s_allocate(VALUE klass) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L1463
  * 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
@@ -1591,7 +1593,7 @@ deflate_run(VALUE args) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L1593
  *
  * 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:
  *

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]