From: Paul Smith Date: 2009-10-14T20:52:56+09:00 Subject: Re: converting object into array On Wed, Oct 14, 2009 at 12:44 PM, Suresh Napster wrote: > hi guys, > > >  i am newbie to ruby and i have an object like @user.And i have values > like inside that object name,age,sex,etc...I want to output like > this.... > > >  ['john','12','male',..] class User def to_array [] << @name << @age << @sex end end > -- > Posted via http://www.ruby-forum.com/. > > -- Paul Smith http://www.nomadicfun.co.uk paul@pollyandpaul.co.uk