From: Gavin Sinclair Date: 2003-07-26T01:43:27+09:00 Subject: Problem with class, struct, and to_s -talk, Anyone care to explain this? I thought 'puts' always called the 'to_s' method on its arguments. Or are classes and structs not designed to be mixed? Thanks, Gavin irb(main):006:0> X = Struct.new(:x) => X irb(main):007:0> x = X.new(6) => # irb(main):008:0> class X irb(main):009:1> def to_s irb(main):010:2> -15 irb(main):011:2> end irb(main):012:1> end => nil irb(main):013:0> puts x # => nil irb(main):014:0> puts x.to_s -15 => nil