diff options
Diffstat (limited to 'spec/ruby/core/string/casecmp_spec.rb')
-rw-r--r-- | spec/ruby/core/string/casecmp_spec.rb | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/spec/ruby/core/string/casecmp_spec.rb b/spec/ruby/core/string/casecmp_spec.rb index 01b22e8f13..986fbc8718 100644 --- a/spec/ruby/core/string/casecmp_spec.rb +++ b/spec/ruby/core/string/casecmp_spec.rb @@ -25,16 +25,8 @@ describe "String#casecmp independent of case" do "abc".casecmp(other).should == 0 end - ruby_version_is ""..."2.5" do - it "raises a TypeError if other can't be converted to a string" do - -> { "abc".casecmp(mock('abc')) }.should raise_error(TypeError) - end - end - - ruby_version_is "2.5" do - it "returns nil if other can't be converted to a string" do - "abc".casecmp(mock('abc')).should be_nil - end + it "returns nil if other can't be converted to a string" do + "abc".casecmp(mock('abc')).should be_nil end it "returns nil if incompatible encodings" do @@ -196,15 +188,7 @@ describe 'String#casecmp? independent of case' do "ß".casecmp?("ss").should be_true end - ruby_version_is "2.4"..."2.5" do - it "raises a TypeError if other can't be converted to a string" do - -> { "abc".casecmp?(mock('abc')) }.should raise_error(TypeError) - end - end - - ruby_version_is "2.5" do - it "returns nil if other can't be converted to a string" do - "abc".casecmp?(mock('abc')).should be_nil - end + it "returns nil if other can't be converted to a string" do + "abc".casecmp?(mock('abc')).should be_nil end end |