summaryrefslogtreecommitdiff
path: root/spec/ruby/core/array/slice_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/array/slice_spec.rb')
-rw-r--r--spec/ruby/core/array/slice_spec.rb34
1 files changed, 16 insertions, 18 deletions
diff --git a/spec/ruby/core/array/slice_spec.rb b/spec/ruby/core/array/slice_spec.rb
index 2f98df9488..8c276f9084 100644
--- a/spec/ruby/core/array/slice_spec.rb
+++ b/spec/ruby/core/array/slice_spec.rb
@@ -154,24 +154,22 @@ describe "Array#slice!" do
-> { ArraySpecs.frozen_array.slice!(0, 0) }.should raise_error(FrozenError)
end
- ruby_version_is "2.6" do
- it "works with endless ranges" do
- a = [1, 2, 3]
- a.slice!(eval("(1..)")).should == [2, 3]
- a.should == [1]
-
- a = [1, 2, 3]
- a.slice!(eval("(2...)")).should == [3]
- a.should == [1, 2]
-
- a = [1, 2, 3]
- a.slice!(eval("(-2..)")).should == [2, 3]
- a.should == [1]
-
- a = [1, 2, 3]
- a.slice!(eval("(-1...)")).should == [3]
- a.should == [1, 2]
- end
+ it "works with endless ranges" do
+ a = [1, 2, 3]
+ a.slice!(eval("(1..)")).should == [2, 3]
+ a.should == [1]
+
+ a = [1, 2, 3]
+ a.slice!(eval("(2...)")).should == [3]
+ a.should == [1, 2]
+
+ a = [1, 2, 3]
+ a.slice!(eval("(-2..)")).should == [2, 3]
+ a.should == [1]
+
+ a = [1, 2, 3]
+ a.slice!(eval("(-1...)")).should == [3]
+ a.should == [1, 2]
end
ruby_version_is "2.7" do