Issue #12005 has been updated by Akira Tanaka.


I feel that unifying Fixnum and Bignum is simple and beautiful.

However I'm not sure that there are enough concrete benefits over
the incompatibility.

For example, when I made the patch, I need to fix complex.c and
ext/json because they used Fixnum and Bignum class to dispatch.

mathn.rb is another example.  mathn.rb modifies methods in Fixnum
and Bignum.
I changed mathn.rb to modify methods in Integer.

Concrete benefits I know is that less code for mathn.rb like library.
It needs to modify only one class, Integer, instead of two, Fixnum and Bignum.

Other benefits?

Are they enough to justify the incompatibility?
I hope enough benefits to justify this issue.


----------------------------------------
Feature #12005: Unify Fixnum and Bignum into Integer
https://bugs.ruby-lang.org/issues/12005#change-58477

* Author: Yui NARUSE
* Status: Assigned
* Priority: Normal
* Assignee: Kenta Murata
----------------------------------------
CRuby has two `Integer` classes, `Fixnum` and `Bignum`.
But it is implementation detail.
They should be seen as a single class `Integer` like `Flonum`.

---Files--------------------------------
unify-fixnum-and-bignum.patch (30.5 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>