summaryrefslogtreecommitdiff
path: root/spec/ruby/core/range/to_a_spec.rb
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2020-01-28 20:47:48 +0100
committerBenoit Daloze <eregontp@gmail.com>2020-01-28 20:47:48 +0100
commit809f0b8a1357f14f9645210d4812f4400c8d397e (patch)
tree7ce6192f94b1dc4b004798aa5d0c4d6bac02577f /spec/ruby/core/range/to_a_spec.rb
parented377cc9aaf1ccbede19ddc6c464f5fbf3cabc34 (diff)
Update to ruby/spec@f8a2d54
Diffstat (limited to 'spec/ruby/core/range/to_a_spec.rb')
-rw-r--r--spec/ruby/core/range/to_a_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/ruby/core/range/to_a_spec.rb b/spec/ruby/core/range/to_a_spec.rb
index 15f0b44a9c..b0067f0e07 100644
--- a/spec/ruby/core/range/to_a_spec.rb
+++ b/spec/ruby/core/range/to_a_spec.rb
@@ -19,4 +19,10 @@ describe "Range#to_a" do
it "works with Ranges of Symbols" do
(:A..:z).to_a.size.should == 58
end
+
+ ruby_version_is "2.6" do
+ it "throws an exception for endless ranges" do
+ -> { eval("(1..)").to_a }.should raise_error(RangeError)
+ end
+ end
end