From: Mark Volkmann Date: 2005-08-27T03:48:39+09:00 Subject: Re: to_s and to_str Here's another example that shows cases when to_s and to_str are used. class Foo def to_s 'to_s' end def to_str 'to_str' end end f = Foo.new puts f # outputs to_s puts 'concat ' + f # outputs concat to_str puts "substitute #{f}" outputs substitute to_s -- R. Mark Volkmann Partner, Object Computing, Inc.