From: Robert Klemme Date: 2006-11-25T04:53:00+09:00 Subject: Re: Problems with String#hash On 24.11.2006 11:18, George Moschovitis wrote: > Dear devs, > > I am facing a very NASTY problem with String#hash > > Here is the same code that I run on 3 different computers: > > root@kosh:~ # irb > irb(main):001:0> "User".hash > => 690465448 > irb(main):002:0> VERSION > => "1.8.2" > > C:\Documents and Settings\drak>irb > irb(main):001:0> "User".hash > => 690465448 > irb(main):002:0> VERSION > => "1.8.4" > > http://tryruby.hobix.com/ > Interactive ruby ready. >>> "User".hash > => 690465448 >>> VERSION > => "1.8" > > root@victory:~# irb > irb(main):001:0> "User".hash > => -1457018200 > irb(main):002:0> VERSION > => "1.8.4" > > Please nottice that on the last case I get a different result! Any > idea why this happens? There is no guarantee that String#hash will behave the same in all versions of Ruby. If this is a problem for you then you probably have an application design problem. Why is this behavior a problem for you? Kind regards robert