diff options
Diffstat (limited to 'spec/ruby/core/range/to_a_spec.rb')
-rw-r--r-- | spec/ruby/core/range/to_a_spec.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/spec/ruby/core/range/to_a_spec.rb b/spec/ruby/core/range/to_a_spec.rb index 52ebc02941..b1d3de32db 100644 --- a/spec/ruby/core/range/to_a_spec.rb +++ b/spec/ruby/core/range/to_a_spec.rb @@ -33,9 +33,7 @@ describe "Range#to_a" do -> { eval("(1..)").to_a }.should raise_error(RangeError) end - ruby_version_is "2.7" do - it "throws an exception for beginless ranges" do - -> { eval("(..1)").to_a }.should raise_error(TypeError) - end + it "throws an exception for beginless ranges" do + -> { (..1).to_a }.should raise_error(TypeError) end end |