Hash

What is the purpose of string hash? What would you use it for?
EXAMPLE: “This is a test.”.hash RETURNS -649841898. WHAT EXACTLY DOES
THIS REPRESENT? WHAT IS IT GOOD FOR? COMPARISONS?

Ron G. wrote:

What is the purpose of string hash? What would you use it for?
EXAMPLE: “This is a test.”.hash RETURNS -649841898. WHAT EXACTLY DOES
THIS REPRESENT? WHAT IS IT GOOD FOR? COMPARISONS?

it has to do with Cryptography, it has nothing to do with the Hash
class, if this is what is confusing you.

is a general explination (not just ruby) but i see it fit good enough.
in terms of usage, well, that’s up to u, i guess.
hth

–shai