Hi,
In message "[ruby-talk:01271] Possible bug with coerce"
on 00/02/08, Dave Thomas <Dave / thomases.com> writes:
|I'm not 100% sure I understand coerce, but I think this is a bug:
|
| 1.coerce(2.5) -> [1.0, 2.5]
| 1.coerce(3) -> [1, 3]
| 1.2.coerce(3) -> [3.0, 1.2] << is this right?
Well, there's a bug. But not there.
x.coerce(y) should return [converted(y), converted(x)], so that it
should be
| 1.coerce(2.5) -> [2.5, 1.0]
| 1.coerce(3) -> [3, 1]
| 1.2.coerce(3) -> [3.0, 1.2] << this is right
I'll correct.
matz.