From: Brian Candler Date: 2011-08-02T22:04:41+09:00 Subject: Re: Numeric#coerce docs are a disaster Roughly speaking: if 'a' is a numeric type, and ruby doesn't know how to make a.+(b) work (where '+' can be any binary math operator), then it calls b.coerce(a) and repeats the operation on the returned pair of values. >> 1 + "2" TypeError: String can't be coerced into Fixnum from (irb):1:in `+' from (irb):1 from :0 >> class String; def coerce(other); [other, self.to_f]; end; end => nil >> 1 + "2" => 3.0 >> 1 - "2" => -1.0 -- Posted via http://www.ruby-forum.com/.