On Wed, 2004-08-18 at 11:48, nobu.nokada / softhome.net wrote:
> Hi,
> 
> At Thu, 19 Aug 2004 00:33:55 +0900,
> Nate Smith wrote in [ruby-talk:109688]:
> > a.name = "Bob"
>   h["Bob"] = "foo"
>   print "Value: " + h[a].to_s + "\n"
> 
> works as you expect.  Note that String#eql? checks if classes
> are same, therefore this doesn't work.

Sorry, I made a small mistake in what I sent out. Instead of 

print "Value: " + h[ "a" ].to_s + "\n"

I meant:

print "Value: " + h[ "Bob" ].to_s + "\n"

So that "Bob" and the variable a would have the same hash value. I don't
think that changes anything though.

Nate