From: Ammar Ali Date: 2010-10-31T22:28:35+09:00 Subject: Re: Range of hex values? On Sun, Oct 31, 2010 at 2:45 PM, Robert Klemme wrote: > > On 30.10.2010 11:33, Ammar Ali wrote: >> >> A workaround that does the right thing in all versions: >> >>   (0..127).to_a.map {|c| c.chr} > > The ".to_a" is superfluous here.  Here are other options > > 127.times.map &:chr > (0..127).map &:chr > Thanks Robert. Another great example of the "TIMTOWTDI-ness" of ruby and how one's view gets shaped by where they started from. I have a slight preference for the one that includes the range. It tells me just a little bit more about what the intention is. Obviously that's just a matter of taste, or lack thereof. I still haven't figured out why it works under 1.9. I guess String#succ has changed. Cheers, Ammar