diff options
Diffstat (limited to 'spec/ruby/core/array')
-rw-r--r-- | spec/ruby/core/array/append_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/array/flatten_spec.rb | 18 | ||||
-rw-r--r-- | spec/ruby/core/array/prepend_spec.rb | 6 |
3 files changed, 8 insertions, 22 deletions
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 |