diff --git a/doc/string/sum.rdoc b/doc/string/sum.rdoc index 5de24e6402..125611411e 100644 --- a/doc/string/sum.rdoc +++ b/doc/string/sum.rdoc @@ -1,4 +1,4 @@ -Returns a basic +n+-bit checksum of the characters in +self+; +Returns a basic +n+-bit {checksum}[https://en.wikipedia.org/wiki/Checksum] of the characters in +self+; the checksum is the sum of the binary value of each byte in +self+, modulo 2**n - 1: @@ -9,3 +9,5 @@ modulo 2**n - 1: 'こんにちは'.sum # => 2582 This is not a particularly strong checksum. + +Related: see {Querying}[rdoc-ref:String@Querying].