>>>>> "B" == Ben Tilly <ben_tilly / hotmail.com> writes: B> class Foo < String B> def foo= (foo) B> @foo = foo B> end B> def foo B> @foo B> end B> end class Foo < String attr_accessor :foo end is faster to write and faster to execute B> puts h[a] puts h[a.to_s] B> puts a.foo B> So how does this work? How does Ruby determine the thing B> hash? (In Perl it is really simple, everything is B> converted to a string and then the strings are hashed.) an hash as a lookup table Guy Decoux