Brian Candler
3/1/2007 9:42:00 AM
On Thu, Mar 01, 2007 at 05:38:50PM +0900, Nanostuff wrote:
> That's pretty much my question :) Thanks.
So you can write
a += b.to_i
or
puts c # which calls an implied #to_s
without getting an error if the argument already *is* an integer or a
string.
Now, as to why there are both #to_i and #to_int, and #to_s and #to_str, I
have no idea :-)