1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
This commit is contained in:
Benoit Daloze 2020-12-27 17:35:32 +01:00
parent 267bed0cd9
commit 727c97da19
108 changed files with 1325 additions and 270 deletions

View file

@ -74,6 +74,12 @@ describe "String#upto" do
a.should == ["a", "b", "c"]
end
it "works with non-ASCII ranges" do
a = []
'Σ'.upto('Ω') { |s| a << s }
a.should == ["Σ", "Τ", "Υ", "Φ", "Χ", "Ψ", "Ω"]
end
describe "on sequence of numbers" do
it "calls the block as Integer#upto" do
"8".upto("11").to_a.should == 8.upto(11).map(&:to_s)