Suresh Napster wrote: > 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',..] Show the code you have so far, and what extra functionality you would like (e.g. "puts @user" to output the string above; or @user.to_a to return an array in the format above). Then we can show you how to extend your code to do what you want. Preferably, post this in the form of a small self-contained program which actually runs. Then we can modify it, test it, and post the updated version. Regards, Brian. -- Posted via http://www.ruby-forum.com/.