From: Rick DeNatale Date: 2009-08-06T01:30:57+09:00 Subject: Re: Bizarre Range behavior On Wed, Aug 5, 2009 at 12:21 PM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: Bizarre Range behavior" >    on Wed, 5 Aug 2009 23:29:08 +0900, "David A. Black" writes: > > |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? > > The point is the current behavior is not really obeying > ASCII/character code logic.  It's a half-cooked magic (comparison done > by dictionary order, but increment done by numerical order), so if we > can come up with the better logic, we can override, I think.  The > current logic is too weird so that I believe none uses it in the real > code. > > Since no one is using this logic, it doesn't matter if we change it, > or keep it if compatibility matters most.  I prefer moving forward. Well my vote is to cook it to use the methods of the endpoints rather than doing something special IF the endpoints are strings and both happen to be numerical. That seems as half cooked to me as the current situation. And if you follow the "if they're numerical" path what do you do about things like ("0x32".."0xFE").to_a ("032".."0100").to_a ("032".."0x32").to_a I say let strings be strings and numbers be numbers! -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale