From 826f44834fe11f3f9c52343443a15b6c83466889 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 8 Feb 2020 19:43:27 +0900 Subject: Drop support for ruby 2.4 from ruby/spec --- spec/ruby/core/array/append_spec.rb | 6 ++---- spec/ruby/core/array/flatten_spec.rb | 18 ++++-------------- spec/ruby/core/array/prepend_spec.rb | 6 ++---- 3 files changed, 8 insertions(+), 22 deletions(-) (limited to 'spec/ruby/core/array') diff --git a/spec/ruby/core/array/append_spec.rb b/spec/ruby/core/array/append_spec.rb index 61b3efe70d..c12473dc07 100644 --- a/spec/ruby/core/array/append_spec.rb +++ b/spec/ruby/core/array/append_spec.rb @@ -35,8 +35,6 @@ describe "Array#<<" do end end -ruby_version_is "2.5" do - describe "Array#append" do - it_behaves_like :array_push, :append - end +describe "Array#append" do + it_behaves_like :array_push, :append end diff --git a/spec/ruby/core/array/flatten_spec.rb b/spec/ruby/core/array/flatten_spec.rb index 32be1cba19..e7cd114b9b 100644 --- a/spec/ruby/core/array/flatten_spec.rb +++ b/spec/ruby/core/array/flatten_spec.rb @@ -109,20 +109,10 @@ describe "Array#flatten" do -> { [@obj].flatten }.should raise_error(TypeError) end - ruby_version_is ""..."2.5" do - it "calls respond_to_missing?(:to_ary, false) to try coercing" do - def @obj.respond_to_missing?(*args) ScratchPad << args; false end - [@obj].flatten.should == [@obj] - ScratchPad.recorded.should == [[:to_ary, false]] - end - end - - ruby_version_is "2.5" do - it "calls respond_to_missing?(:to_ary, true) to try coercing" do - def @obj.respond_to_missing?(*args) ScratchPad << args; false end - [@obj].flatten.should == [@obj] - ScratchPad.recorded.should == [[:to_ary, true]] - end + it "calls respond_to_missing?(:to_ary, true) to try coercing" do + def @obj.respond_to_missing?(*args) ScratchPad << args; false end + [@obj].flatten.should == [@obj] + ScratchPad.recorded.should == [[:to_ary, true]] end it "does not call #to_ary if not defined when #respond_to_missing? returns false" do diff --git a/spec/ruby/core/array/prepend_spec.rb b/spec/ruby/core/array/prepend_spec.rb index 22230ec300..368b8dcfcd 100644 --- a/spec/ruby/core/array/prepend_spec.rb +++ b/spec/ruby/core/array/prepend_spec.rb @@ -2,8 +2,6 @@ require_relative '../../spec_helper' require_relative 'fixtures/classes' require_relative 'shared/unshift' -ruby_version_is "2.5" do - describe "Array#prepend" do - it_behaves_like :array_unshift, :prepend - end +describe "Array#prepend" do + it_behaves_like :array_unshift, :prepend end -- cgit v1.2.3