diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-28 06:13:50 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-28 06:13:50 +0000 |
commit | 5d83f5554fac14778e7e738049bb51849ecf28b0 (patch) | |
tree | 379847c9d70c1e659a0b46bc85aa99398253012f /ext | |
parent | 628f75b7524c8cd10bb2760c62d2311dbfeed70d (diff) | |
download | ruby-5d83f5554fac14778e7e738049bb51849ecf28b0.tar.gz |
* 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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/zlib/zlib.c | 9 |
1 files changed, 8 insertions, 1 deletions
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) |