From: Elmar Sonnenschein Date: 2001-10-12T05:00:04+09:00 Subject: [ruby-talk:22442] Instance method overloading - a bug? I have a problem with the overloading of the method to_s for object instances. The code a = [1,2,3] def a.to_s() s = "" each {|x| s += "-#{x}-" } return s end puts a puts a.to_s print a will yield the following result: 1 2 3 -1--2--3- -1--2--3- My question is, why does Ruby handle "puts" for an array different than "print"? If I implement the same code for a Hash object the output is the same for both calls. Regards, Elmar