From: matz@... (Yukihiro Matsumoto) Date: 2001-12-10T14:33:14+09:00 Subject: [ruby-talk:28062] Re: How does puts decide how to print a given object? Hi, In message "[ruby-talk:28052] How does puts decide how to print a given object?" on 01/12/10, "Harry Ohlsen" writes: |This got me to thinking how puts does its conversion to a string. I ask |because (a) I'm surprised it doesn't just use to_s and because someone |reading the article is bound to ask :-). "puts a" does if a is an array puts each element of it else a = a.to_s print a print "\n" unless a[-1] == ?\n end Use print for simpler behavior. matz.