diff options
author | Benoit Daloze <[email protected]> | 2021-07-29 22:11:21 +0200 |
---|---|---|
committer | Benoit Daloze <[email protected]> | 2021-07-29 22:11:21 +0200 |
commit | 6998d758248d778fa95b008c78d05473e48b8428 (patch) | |
tree | 8abc6926f647ea5f374a5b34c3a4820c5861e32e /spec/ruby/core/string/shared | |
parent | 15d05f8120745a121b93fab9fd2addf5f094e8d2 (diff) |
Update to ruby/spec@b65d01f
Diffstat (limited to 'spec/ruby/core/string/shared')
-rw-r--r-- | spec/ruby/core/string/shared/slice.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/ruby/core/string/shared/slice.rb b/spec/ruby/core/string/shared/slice.rb index a674e0b6ef..1db8fd6730 100644 --- a/spec/ruby/core/string/shared/slice.rb +++ b/spec/ruby/core/string/shared/slice.rb @@ -327,13 +327,11 @@ describe :string_slice_range, shared: true do -> { "hello".send(@method, 0..bignum_value) }.should raise_error(RangeError) end - ruby_version_is "2.6" do - it "works with endless ranges" do - "hello there".send(@method, eval("(2..)")).should == "llo there" - "hello there".send(@method, eval("(2...)")).should == "llo there" - "hello there".send(@method, eval("(-4..)")).should == "here" - "hello there".send(@method, eval("(-4...)")).should == "here" - end + it "works with endless ranges" do + "hello there".send(@method, eval("(2..)")).should == "llo there" + "hello there".send(@method, eval("(2...)")).should == "llo there" + "hello there".send(@method, eval("(-4..)")).should == "here" + "hello there".send(@method, eval("(-4...)")).should == "here" end ruby_version_is "2.7" do |