From: Raj Singh Date: 2008-06-26T03:50:24+09:00 Subject: puts a . which method of array is called a = w(1 2 3) puts a prints 1 2 3 I implemented class Array def to_s 'to_s is called' end def to_str 'to_str is called' end end I am not able to find when I do 'puts a' which method of a is called. I also tried inspect and to_ary method but doesn't seem to work. Also I would like to know how to go about finding which method is called without looking at the c file. Is there some kind of trace I can do to detect which method was called? -- Posted via http://www.ruby-forum.com/.