On 2010/12/01 2:07, NARUSE, Yui wrote:

> It is intended. Ruby 1.9 explicitly use session local random seed
> to calculate a hash for strings (and some other objects).
>
> This is because the implementation of Object#hash is different
> between versions (like 1.9.1 and 1.9.2) and implementations
> (like JRuby, Rubinius, IronRuby, and so on). We want people to
> write portable code around Object#hash, so we did so.

Also, it helps to avoid some denial of service attacks, such as 
registering hundreds and thousands of users with usernames that have the 
same hash code.

Regards,  Martin.


-- 
#-# Martin J. Dürst, Professor, Aoyama Gakuin University
#-# http://www.sw.it.aoyama.ac.jp   mailto:duerst / it.aoyama.ac.jp