From: Yukihiro Matsumoto Date: 2009-08-05T13:55:55+09:00 Subject: Re: Bizarre Range behavior Hi, In message "Re: Bizarre Range behavior" on Wed, 5 Aug 2009 05:32:37 +0900, Rob Biedenharn writes: |Knowing this, here's an even more bizzare-looking example: | |irb> "19".succ |=> "20" |irb> ("2".."19").to_a |=> [] |irb> ("2"..."20").to_a |=> ["2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", |"14", "15", "16", "17", "18", "19"] What if I sprinkle more magic to the language and change String#upto to generate numerical sequences when all characters in edges are digits, so that irb> ("2".."19").to_a => ["2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19"] irb> ("2"..."20").to_a => ["2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"] Any opinion? I already made a patch for trunk. matz.