Hello ruby-core!

I was just wondering why in MRI, Bignum#coerce(1)[0] returns a Bignum.

Is it to strictly satisfy the `coerce` protocol of returning two object of
the same class?
As far as I know, all other places in the code base return a Fixnum for
computations that fit in its range, and Bignum#coerce seems the only
exception.

I have been experimenting with disallowing Bignum with values in the Fixnum
range in another implementation and so far it seems to cause no
incompatibility,
because core numeric operations already handle Bignum directly anyway and
Fixnum/Bignum are mostly implementation detail for the regular Ruby user.

So, is there a particular reason why Bignum#coerce allows to create Bignum
in Fixnum range?
(supressed text/html)
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>