Ranges and Enumerable problems

I don’t dislike the answer - I was just curious about the change. But
now I’m wondering about David’s earlier statement that under 1.9,
(’!’…’~’).to_a works ‘correctly’.
No surprise here either
456/26 > ruby1.9 -ve ‘p ("!"…"~").to_a’
ruby 1.9.0 (2007-12-25 revision 14709) [i486-linux]
-e:1: warning: (…) interpreted as grouped expression
["!", “”", “#”, “$”, “%”, “&”, “’”, “(”, “)”, “*”, “+”, “,”, “-”,
“.”, “/”, “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”]

but my 1.9 version is quite old as you can see, I doubt however that
this has changed.

R.

Hi –

On Fri, 4 Jul 2008, Robert D. wrote:

but my 1.9 version is quite old as you can see, I doubt however that
this has changed.

Well, I didn’t falsify my results :slight_smile: It really did do this:

("!"…"~").to_a
=> ["!", “”", “#”, “$”, “%”, “&”, “’”, “(”, “)”, “*”, “+”, “,”, “-”,
“.”, “/”, “0”, “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “:”, “;”,
“<”, “=”, “>”, “?”, “@”, “A”, “B”, “C”, “D”, “E”, “F”, “G”, “H”, “I”,
“J”, “K”, “L”, “M”, “N”, “O”, “P”, “Q”, “R”, “S”, “T”, “U”, “V”, “W”,
“X”, “Y”, “Z”, “[”, “\”, “]”, “^”, “_”, “`”, “a”, “b”, “c”, “d”, “e”,
“f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”,
“t”, “u”, “v”, “w”, “x”, “y”, “z”, “{”, “|”, “}”, “~”]

as I stated. I think that means it has changed. This is “ruby 1.9.0
(2008-04-30 revision 16244) [i686-darwin9.2.2]”

David

On Thu, Jul 3, 2008 at 6:48 AM, Rick DeNatale [email protected]
wrote:


Rick DeNatale

Okay, you made your point, but you don’t have to rub it in… (crosses
arms and says “hmppph” [picture a little girl here] :slight_smile:

I don’t know why, but when I first looked at it, I had a gut feeling
there was something wrong with Rick’s statement. Then, I realized my
mistake. Darn it!

Todd

Sorry David I did not remember your post, but I guess it is a good
thing to demonstrate that Ruby1.9 is evolving and we all should
upgrade often :slight_smile:
Cheers
Robert