diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-02-08 19:43:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-04-01 15:36:20 +0900 |
commit | 826f44834fe11f3f9c52343443a15b6c83466889 (patch) | |
tree | f2c2abed62db1c750515cd8b0fbac6442b6d4200 /spec/ruby/optional/capi/numeric_spec.rb | |
parent | 3a2073e61b6ccce6d07d31ebd89d4c385b9a55f2 (diff) |
Drop support for ruby 2.4 from ruby/spec
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2892
Diffstat (limited to 'spec/ruby/optional/capi/numeric_spec.rb')
-rw-r--r-- | spec/ruby/optional/capi/numeric_spec.rb | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/spec/ruby/optional/capi/numeric_spec.rb b/spec/ruby/optional/capi/numeric_spec.rb index de7e180414..d433d19274 100644 --- a/spec/ruby/optional/capi/numeric_spec.rb +++ b/spec/ruby/optional/capi/numeric_spec.rb @@ -437,23 +437,12 @@ describe "CApiNumericSpecs" do @s.rb_num_coerce_cmp(2, obj, :<=>).should == -1 end - ruby_version_is ""..."2.5" do - it "returns nil if passed nil" do - -> { - @result = @s.rb_num_coerce_cmp(nil, 2, :<=>) - }.should complain(/comparison operators will no more rescue exceptions/) - @result.should be_nil - end - end - - ruby_version_is "2.5" do - it "lets the exception go through if #coerce raises an exception" do - obj = mock("rb_num_coerce_cmp") - obj.should_receive(:coerce).with(2).and_raise(RuntimeError.new("my error")) - -> { - @s.rb_num_coerce_cmp(2, obj, :<=>) - }.should raise_error(RuntimeError, "my error") - end + it "lets the exception go through if #coerce raises an exception" do + obj = mock("rb_num_coerce_cmp") + obj.should_receive(:coerce).with(2).and_raise(RuntimeError.new("my error")) + -> { + @s.rb_num_coerce_cmp(2, obj, :<=>) + }.should raise_error(RuntimeError, "my error") end it "returns nil if #coerce does not return an Array" do |