mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
14 lines
427 B
Ruby
14 lines
427 B
Ruby
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
|