aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/string
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string')
-rw-r--r--spec/ruby/core/string/upto_spec.rb6
1 files changed, 6 insertions, 0 deletions
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)