From 727c97da1977544c91b9b3677811da3a44af7d53 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sun, 27 Dec 2020 17:35:32 +0100 Subject: Update to ruby/spec@4ce9f41 --- spec/ruby/core/string/upto_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/ruby/core/string') diff --git a/spec/ruby/core/string/upto_spec.rb b/spec/ruby/core/string/upto_spec.rb index b988613a80..f8529b1d2b 100644 --- a/spec/ruby/core/string/upto_spec.rb +++ b/spec/ruby/core/string/upto_spec.rb @@ -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) -- cgit v1.2.3