Hi!
My first patch. Hope it's correct. :)
Somebody confused "modulo" and "and" in the docs for String.sum
<i>str</i> modulo <code>2n - 1</code>
It should be
<i>str</i> modulo <code>2n</code>
or even better
<i>str</i> modulo <code>2**n</code>
A patch is pasted in below.
Regards,
Jesper
Index: string.c
===================================================================
--- string.c (revision 22183)
+++ string.c (working copy)
@@ -6428,7 +6428,7 @@
* Returns a basic <em>n</em>-bit checksum of the characters in <i>str</i>,
* where <em>n</em> is the optional <code>Fixnum</code> parameter, defaulting
* to 16. The result is simply the sum of the binary value of each
character in
- * <i>str</i> modulo <code>2n - 1</code>. This is not a particularly good
+ * <i>str</i> modulo <code>2**n</code>. This is not a particularly good
* checksum.
*/