From 5d83f5554fac14778e7e738049bb51849ecf28b0 Mon Sep 17 00:00:00 2001 From: zzak Date: Tue, 28 Jan 2014 06:13:50 +0000 Subject: * ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32 Patch by Vajrasky Kok [Bug #9307] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'ext/zlib/zlib.c') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 391bec1722..c0f52c23cc 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -429,7 +429,14 @@ do_checksum(argc, argv, func) * +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) -- cgit v1.2.3