Integrate Fixnum class into Integer class

* The `Fixnum` constant is now an alias for the `Integer` class.
* Remove `struct mrb_state::fixnum_class` member.
  If necessary, use `struct mrb_state::integer_class` instead.
This commit is contained in:
dearblue
2020-01-19 09:48:14 +09:00
committed by Yukihiro "Matz" Matsumoto
parent 40d0d8fe0e
commit 80fe9838d2
31 changed files with 99 additions and 99 deletions
+1 -1
View File
@@ -34,5 +34,5 @@ assert('BS Literal 8') do
end
assert('BS Literal 9') do
assert_equal Fixnum, 1234.class
assert_equal Integer, 1234.class
end
+1 -1
View File
@@ -156,7 +156,7 @@ assert('Integer#<<', '15.2.8.3.12') do
skip unless Object.const_defined?(:Float)
# Overflow to Fixnum
# Overflow to Integer
assert_float 9223372036854775808.0, 1 << 63
assert_float(-13835058055282163712.0, -3 << 62)
end
+1 -1
View File
@@ -76,7 +76,7 @@ assert('Kernel.raise', '15.3.1.2.12') do
end
assert('Kernel#__id__', '15.3.1.3.3') do
assert_equal Fixnum, __id__.class
assert_equal Integer, __id__.class
end
assert('Kernel#__send__', '15.3.1.3.4') do
+1 -1
View File
@@ -593,7 +593,7 @@ end
# to_f / other
# end
# end
# Fixnum.send(:prepend, M)
# Integer.send(:prepend, M)
# assert_equal(0.5, 1 / 2, "#{bug7983}")
# }
# assert_equal(0, 1 / 2)
+3 -3
View File
@@ -17,7 +17,7 @@ assert('mrb_vformat') do
assert_equal '`t`: NilClass', vf.v('`t`: %t', nil)
assert_equal '`t`: FalseClass', vf.v('`t`: %t', false)
assert_equal '`t`: TrueClass', vf.v('`t`: %t', true)
assert_equal '`t`: Fixnum', vf.v('`t`: %t', 0)
assert_equal '`t`: Integer', vf.v('`t`: %t', 0)
assert_equal '`t`: Hash', vf.v('`t`: %t', {k: "value"})
assert_match '#<Class:#<Class:#<Hash:0x*>>>', vf.v('%t', sclass({}))
assert_equal 'string and length', vf.l('string %l length', 'andante', 3)
@@ -29,13 +29,13 @@ assert('mrb_vformat') do
assert_equal '`T`: NilClass', vf.v('`T`: %T', nil)
assert_equal '`T`: FalseClass', vf.v('`T`: %T', false)
assert_equal '`T`: TrueClass', vf.v('`T`: %T', true)
assert_equal '`T`: Fixnum', vf.v('`T`: %T', 0)
assert_equal '`T`: Integer', vf.v('`T`: %T', 0)
assert_equal '`T`: Hash', vf.v('`T`: %T', {k: "value"})
assert_match 'Class', vf.v('%T', sclass({}))
assert_equal '`Y`: nil', vf.v('`Y`: %Y', nil)
assert_equal '`Y`: false', vf.v('`Y`: %Y', false)
assert_equal '`Y`: true', vf.v('`Y`: %Y', true)
assert_equal '`Y`: Fixnum', vf.v('`Y`: %Y', 0)
assert_equal '`Y`: Integer', vf.v('`Y`: %Y', 0)
assert_equal '`Y`: Hash', vf.v('`Y`: %Y', {k: "value"})
assert_equal 'Class', vf.v('%Y', sclass({}))
assert_match '#<Class:#<String:0x*>>', vf.v('%v', sclass(""))