summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/downcase_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/downcase_spec.rb')
-rw-r--r--spec/ruby/core/string/downcase_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/ruby/core/string/downcase_spec.rb b/spec/ruby/core/string/downcase_spec.rb
index 8c840bdcc4..4427c9df10 100644
--- a/spec/ruby/core/string/downcase_spec.rb
+++ b/spec/ruby/core/string/downcase_spec.rb
@@ -76,8 +76,16 @@ describe "String#downcase" do
end
end
- it "returns a subclass instance for subclasses" do
- StringSpecs::MyString.new("FOObar").downcase.should be_an_instance_of(StringSpecs::MyString)
+ ruby_version_is ''...'3.0' do
+ it "returns a subclass instance for subclasses" do
+ StringSpecs::MyString.new("FOObar").downcase.should be_an_instance_of(StringSpecs::MyString)
+ end
+ end
+
+ ruby_version_is '3.0' do
+ it "returns a String instance for subclasses" do
+ StringSpecs::MyString.new("FOObar").downcase.should be_an_instance_of(String)
+ end
end
end