diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-17 06:53:48 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-17 06:53:48 +0000 |
commit | f9727c12cc8fbc5f752f5983be1f14bb976e5a13 (patch) | |
tree | bdf433b181c6d6e00bd33581136ab2970bc9509d /test/ruby/test_integer.rb | |
parent | 565241f11f5d217631ed1e8bbafec7a088bed654 (diff) | |
download | ruby-f9727c12cc8fbc5f752f5983be1f14bb976e5a13.tar.gz |
[Feature #12005] Unify Fixnum and Bignum into Integer
* [Feature #12005] Unify Fixnum and Bignum into Integer
* include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums.
* insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from
FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG.
* vm_core.h: Ditto.
* vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead
of FIXNUM_REDEFINED_OP_FLAG.
* vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of
rb_cFixnum and rb_cBignum.
(C): Use Integer instead of Fixnum and Bignum.
* numeric.c (fix_succ): Removed.
(Init_Numeric): Define Fixnum as Integer.
* bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum.
(rb_int_coerce): replaced from rb_big_coerce and return fixnums
as-is.
(Init_Bignum): Define Bignum as Integer.
Don't define ===.
* error.c (builtin_class_name): Return "Integer" for fixnums.
* sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum.
* ext/-test-/testutil: New directory to test.
Currently it provides utilities for fixnum and bignum.
* ext/json/generator/generator.c: Define mInteger_to_json.
* lib/mathn.rb (Fixnum#/): Redefinition removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_integer.rb')
-rw-r--r-- | test/ruby/test_integer.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/test/ruby/test_integer.rb b/test/ruby/test_integer.rb index 12ada1709e..e493a7546d 100644 --- a/test/ruby/test_integer.rb +++ b/test/ruby/test_integer.rb @@ -109,20 +109,6 @@ class TestInteger < Test::Unit::TestCase def test_succ assert_equal(2, 1.send(:succ)) - - Fixnum.class_eval do - alias succ_bak succ - remove_method :succ - end - - assert_equal(2, 1.succ) - assert_equal(4294967297, 4294967296.succ) - - ensure - Fixnum.class_eval do - alias succ succ_bak - remove_method :succ_bak - end end def test_chr |