From: 7stud -- Date: 2008-02-07T06:56:51+09:00 Subject: Re: How to add string objects to hash? 7stud -- wrote: > > Yeah, you're just creating a hash that looks like this: > > h = {'hello'=>'hello', 'goodbye'=>'goodbye'} ...and to retrieve a value from the hash, you would write: x = 'hello' puts h[x] but you could just write: puts x and dispense with the hash altogether. -- Posted via http://www.ruby-forum.com/.