blob: f6f60fa0546f4371923853c0b11f776ceb0a9b80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
require_relative '../../spec_helper'
describe "Range#count" do
ruby_version_is "2.7" do
it "returns Infinity for beginless ranges without arguments or blocks" do
inf = Float::INFINITY
eval("('a'...)").count.should == inf
eval("(7..)").count.should == inf
eval("(...'a')").count.should == inf
eval("(...nil)").count.should == inf
eval("(..10.0)").count.should == inf
end
end
end
|