From: Yukihiro Matsumoto Date: 2009-08-17T23:28:23+09:00 Subject: Re: Bizarre Range behavior Hi, In message "Re: Bizarre Range behavior" on Mon, 17 Aug 2009 21:38:11 +0900, Rick DeNatale writes: | |On Sun, Aug 16, 2009 at 6:20 PM, Yukihiro Matsumoto wrote: |> I admit 1.8 behavior in above example is simpler to implement, but 1.9 |> behavior follows our (or more precisely "my") unwritten expectation of |> character iteration. | |Matz, FWIW, and I don't think I'm alone, my expectations are based on |Ruby being object oriented meaning, for example, that things related |to iteration/enumeration should be understandable based on messages |being sent to the elements. | |Any magic which can't be explained in these terms 'astonishes' me. I repeat. If String#upto has not contained magic (that inherited from Perl) for long time, I wouldn't add any magic that is difficult to explain using messaging model. But in reality, it does now, and we cannot remove it. So, I'd rather move forward to avoid astonishment of mere mortal seeing: ("9".."11").to_a where String#succ generates "9", "10", "11". And I promise I would not add any new method with Perl-like magic behavior in the future. matz.