From: chad fowler Date: 2001-08-20T20:20:17+09:00 Subject: [ruby-talk:20014] Re: Object hashing trouble --- Chris Reay wrote: > How do I refer to my objects' keys in a Hash? The > following snippet > demonstrates my problem ... > > Thanks > > Chris > > ------------------------------------------------------------------ > class Company > def initialize(name) > @name = name > end > > def to_s > sprintf("Company(%s)", @name) > end > > def hash > @name > end > end > What are you trying to accomplish with the "hash" method here? Your example works if you don't "def hash". __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/