From: Nate Smith Date: 2004-08-20T04:54:06+09:00 Subject: Re: Hash values too big to fit into buckets On Thu, 2004-08-19 at 15:45, Florian Gross wrote: > Nate Smith wrote: > > > Hello, > > Moin! Hallo! > > > Is there any way to get around values being too big (being assigned as > > bignums) to fit into a hash? (Not a Hash class, but a hash fixnum > > assigned to each bucket). For example, in my LR parser, each > > Production's hash is composed of the hashes of its elements: > > > > def hash # Production#hash > > @nonTerminal.hash + @action.hash + @expansion.hash > > end > > Maybe like this? > > def hash > [@nonTerminal, @action, @expansion].hash > end Ah, great. That didn't work completely (but sent me on the path that got to this, which fixed the problem): [@nonTerminal.hash, @action.hash, @expansion.hash].hash.hash Thanks much. Nate