1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core/range/count_spec.rb
2022-04-25 14:53:54 +02:00

12 lines
354 B
Ruby

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