blob: 24d4a9caf35d73456730f2a4dd3dc4c7ae1deae4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
require_relative '../../spec_helper'
describe "Range#count" 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
(...'a').count.should == inf
(...nil).count.should == inf
(..10.0).count.should == inf
end
end
|