From: "David A. Black" Date: 2009-08-05T23:29:08+09:00 Subject: Re: Bizarre Range behavior Hi -- On Wed, 5 Aug 2009, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Bizarre Range behavior" > on Wed, 5 Aug 2009 20:14:45 +0900, Brian Candler writes: > > |Yukihiro Matsumoto wrote: > |> What if I sprinkle more magic to the language and change String#upto > |> to generate numerical sequences when all characters in edges are > |> digits, > > |-1 for added complexity with little benefit > > I admit it's a dark art of Perl-ish, but String#upto and String#succ > that a range of strings calls already have astonishingly Perl-ish > complexity (and I don't think we can remove the magic), and I prefer > hard-boiled magic to half-cooked current one. Actually, I think this > magic is the one I should have invented and added years ago. If you make this change, how would you then accomplish the old version? In other words, if you wanted: "2".."19" to obey ASCII/character code logic, would there still be a way? That would be my concern: that right now you can do either (even though one is a little harder), but the change might make it impossible (??) to do the one we can do now. David -- David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com Q: What's the best way to get a really solid knowledge of Ruby? A: Come to our Ruby training in Edison, New Jersey, September 14-17! Instructors: David A. Black and Erik Kastner More info and registration: http://rubyurl.com/vmzN