ruby-changes:32644
From: zzak <ko1@a...>
Date: Tue, 28 Jan 2014 15:13:55 +0900 (JST)
Subject: [ruby-changes:32644] zzak:r44723 (trunk): * ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32
zzak 2014-01-28 15:13:50 +0900 (Tue, 28 Jan 2014) New Revision: 44723 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44723 Log: * ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32 Patch by Vajrasky Kok [Bug #9307] [ci skip] Modified files: trunk/ChangeLog trunk/ext/zlib/zlib.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44722) +++ ChangeLog (revision 44723) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jan 28 15:12:22 2014 Zachary Scott <e@z...> + + * ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32 + Patch by Vajrasky Kok [Bug #9307] [ci skip] + Tue Jan 28 08:56:00 2014 Charlie Somerville <charliesome@r...> * compile.c (iseq_build_from_ary_body): Use :blockptr instead of :block Index: ext/zlib/zlib.c =================================================================== --- ext/zlib/zlib.c (revision 44722) +++ ext/zlib/zlib.c (revision 44723) @@ -429,7 +429,14 @@ do_checksum(argc, argv, func) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L429 * +adler+. If +string+ is omitted, it returns the Adler-32 initial value. If * +adler+ is omitted, it assumes that the initial value is given to +adler+. * - * FIXME: expression. + * Example usage: + * + * require "zlib" + * + * data = "foo" + * puts "Adler32 checksum: #{Zlib.adler32(data).to_s(16)}" + * #=> Adler32 checksum: 2820145 + * */ static VALUE rb_zlib_adler32(int argc, VALUE *argv, VALUE klass) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/