summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2020-07-27 16:15:28 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-22 02:51:49 +0900
commitc30f03d32833f38fedf41ecb08f1ade9c6657fef (patch)
tree735949b112c79e5c0c78aa3509d1119e8884a006 /spec
parent5c0abe2d94c545275079a862dc36bb163953010a (diff)
Data: delete
Has been deprecated since 684bdf6171b76f5bc5e4f05926a5ab01ec2b4fd5. Matz says in [ruby-core:83954] that Data should be an alias of Object. Because rb_cData has not been deprecated, let us deprecate the constant to make it a C-level synonym of rb_cObject.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3961
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/data/constants_spec.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/spec/ruby/core/data/constants_spec.rb b/spec/ruby/core/data/constants_spec.rb
index 0e47a82e26..5027ae0d7e 100644
--- a/spec/ruby/core/data/constants_spec.rb
+++ b/spec/ruby/core/data/constants_spec.rb
@@ -1,13 +1,15 @@
require_relative '../../spec_helper'
-describe "Data" do
- it "is a subclass of Object" do
- suppress_warning do
- Data.superclass.should == Object
+ruby_version_is ''...'2.8' do
+ describe "Data" do
+ it "is a subclass of Object" do
+ suppress_warning do
+ Data.superclass.should == Object
+ end
end
- end
- it "is deprecated" do
- -> { Data }.should complain(/constant ::Data is deprecated/)
+ it "is deprecated" do
+ -> { Data }.should complain(/constant ::Data is deprecated/)
+ end
end
end