From: Lee Griffiths Date: 2008-11-25T05:25:19+09:00 Subject: Re: what's wrong with this method equinox wrote: > On Nov 24, 10:52�am, Lee Griffiths wrote: >> @friends.each do {|key, value| puts("#{key}/#{value} ,") } >> >> It's EITHER { } OR do...end. Not both (or half of one)! :) >> -- >> Posted viahttp://www.ruby-forum.com/. > > I just want it to return a string.. and for the second line I want to > get the string from the key value pair in the hash Only the _LAST_ statement in a function is the return value. So put that string second after you've done a puts. If you haven't alread done so, give this a read: http://www.rubycentral.com/book/ -- Posted via http://www.ruby-forum.com/.