From: 7stud -- Date: 2011-08-02T15:28:42+09:00 Subject: Re: how to make 1+a work if a is not a numeric object? Zd Yu wrote in post #1014364: > 7stud -- wrote in post #1014362: >> Is it your belief that the only types that can appear on either side of >> a + sign are Integers? > > I just made my question simple. it actually could be either integer or > float. class A def to_i 10 end end a = A.new result = 1 + a.to_i puts result --output:-- 11 Works fine, all the time. -- Posted via http://www.ruby-forum.com/.