From: "David A. Black" Date: 2008-07-04T18:54:10+09:00 Subject: Re: Ranges and Enumerable problems Hi -- On Fri, 4 Jul 2008, Robert Dober wrote: >> >> 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. Well, I didn't falsify my results :-) 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 -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails July 21-24 Edison, NJ Advancing With Rails August 18-21 Edison, NJ See http://www.rubypal.com for details and updates!