summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bignum.c4
-rw-r--r--numeric.c4
-rw-r--r--sample/trick2015/kinaba/entry.rb4
-rw-r--r--spec/ruby/core/integer/constants_spec.rb32
4 files changed, 19 insertions, 25 deletions
diff --git a/bignum.c b/bignum.c
index f83fbe2c14..841ed78665 100644
--- a/bignum.c
+++ b/bignum.c
@@ -7169,10 +7169,6 @@ rb_int_powm(int const argc, VALUE * const argv, VALUE const num)
void
Init_Bignum(void)
{
- /* An obsolete class, use Integer */
- rb_define_const(rb_cObject, "Bignum", rb_cInteger);
- rb_deprecate_constant(rb_cObject, "Bignum");
-
rb_define_method(rb_cInteger, "coerce", rb_int_coerce, 1);
#ifdef USE_GMP
diff --git a/numeric.c b/numeric.c
index d6fe05d8e8..1de11d1284 100644
--- a/numeric.c
+++ b/numeric.c
@@ -6290,10 +6290,6 @@ Init_Numeric(void)
rb_gc_register_mark_object(rb_fix_to_s_static[i]);
}
- /* An obsolete class, use Integer */
- rb_define_const(rb_cObject, "Fixnum", rb_cInteger);
- rb_deprecate_constant(rb_cObject, "Fixnum");
-
rb_cFloat = rb_define_class("Float", rb_cNumeric);
rb_undef_alloc_func(rb_cFloat);
diff --git a/sample/trick2015/kinaba/entry.rb b/sample/trick2015/kinaba/entry.rb
index aa077dc240..2a75888ef5 100644
--- a/sample/trick2015/kinaba/entry.rb
+++ b/sample/trick2015/kinaba/entry.rb
@@ -54,8 +54,8 @@ while 0x00012345 >= $counter
srand +big && $counter >> 0b1
Enumerable
- Fixnum
- Bignum
+ String
+ Struct
Math
Complex
Comparable
diff --git a/spec/ruby/core/integer/constants_spec.rb b/spec/ruby/core/integer/constants_spec.rb
index 3b8b01e330..2aaa659d5a 100644
--- a/spec/ruby/core/integer/constants_spec.rb
+++ b/spec/ruby/core/integer/constants_spec.rb
@@ -1,25 +1,27 @@
require_relative '../../spec_helper'
-describe "Fixnum" do
- it "is unified into Integer" do
- suppress_warning do
- Fixnum.should equal(Integer)
+ruby_version_is ""..."3.1" do
+ describe "Fixnum" do
+ it "is unified into Integer" do
+ suppress_warning do
+ Fixnum.should equal(Integer)
+ end
end
- end
- it "is deprecated" do
- -> { Fixnum }.should complain(/constant ::Fixnum is deprecated/)
+ it "is deprecated" do
+ -> { Fixnum }.should complain(/constant ::Fixnum is deprecated/)
+ end
end
-end
-describe "Bignum" do
- it "is unified into Integer" do
- suppress_warning do
- Bignum.should equal(Integer)
+ describe "Bignum" do
+ it "is unified into Integer" do
+ suppress_warning do
+ Bignum.should equal(Integer)
+ end
end
- end
- it "is deprecated" do
- -> { Bignum }.should complain(/constant ::Bignum is deprecated/)
+ it "is deprecated" do
+ -> { Bignum }.should complain(/constant ::Bignum is deprecated/)
+ end
end
end