From: ts Date: 2001-12-11T02:35:54+09:00 Subject: [ruby-talk:28110] Re: How does puts decide how to print a given object? >>>>> "D" == David Alan Black writes: D> In general (?), though, puts will consult an object's to_s method, puts look 1) if the object is nil, it give "nil" 2) it try to call #to_ary (if the type of the object is not Array). This call can fail, return nil or an object of type Array * if the type of the result is an Array, ruby use a special algorithm * otherwise it call #to_s Guy Decoux