diff options
Diffstat (limited to 'spec/ruby/core/array/intersection_spec.rb')
-rw-r--r-- | spec/ruby/core/array/intersection_spec.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/ruby/core/array/intersection_spec.rb b/spec/ruby/core/array/intersection_spec.rb index 27d90f1e44..e01a68d389 100644 --- a/spec/ruby/core/array/intersection_spec.rb +++ b/spec/ruby/core/array/intersection_spec.rb @@ -6,16 +6,14 @@ describe "Array#&" do it_behaves_like :array_intersection, :& end -ruby_version_is "2.7" do - describe "Array#intersection" do - it_behaves_like :array_intersection, :intersection +describe "Array#intersection" do + it_behaves_like :array_intersection, :intersection - it "accepts multiple arguments" do - [1, 2, 3, 4].intersection([1, 2, 3], [2, 3, 4]).should == [2, 3] - end + it "accepts multiple arguments" do + [1, 2, 3, 4].intersection([1, 2, 3], [2, 3, 4]).should == [2, 3] + end - it "preserves elements order from original array" do - [1, 2, 3, 4].intersection([3, 2, 1]).should == [1, 2, 3] - end + it "preserves elements order from original array" do + [1, 2, 3, 4].intersection([3, 2, 1]).should == [1, 2, 3] end end |