From: Panagiotis Atmatzidis Date: 2011-08-10T06:32:01+09:00 Subject: Re: Inspect method Hello Chris, On 9 Αυγ 2011, at 7:56 μ.μ., Chris White wrote: > > On Aug 9, 2011, at 9:49 AM, amir e. wrote: > >> Hi >> I want to know exactly what does inspect method do ? >> and What does happened , if we don't use inspect ? >> thanks >> >> -- >> Posted via http://www.ruby-forum.com/. >> > > It depends (inspect can be overridden), but in general the to_s method of the object is called. See more information here: > > http://ruby-doc.org/core/classes/Object.html#M001025 > > Regards, > Chris White > http://twitter.com/cwgem I don't know if Amir got it, but I certainly don't. After throwing a few 'irb' lines I still don't understand where should I use inspect of each. "Time.new.inspect == puts x = Time.new" Which as you said makes sense, because turns the obj into string, but can you explain a bit the list example? I have the same problem with .map which is often used by many developers… I don't understand the difference between map and each. I find them to have the same results. regards -- Panagiotis Atmatzidis email: ml@convalesco.org blog: http://www.convalesco.org The wise man said: "Never argue with an idiot. They bring you down to their level and beat you with experience."