# Ranges and Enumerable problems

**URL:** <https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015>\
**Category:** Ruby\
**Created:** [July 2, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015 "2008-07-02T16:55:25Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 4, 2008, 9:40am UTC](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015/21 "2008-07-04T09:40:40Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 4, 2008, 11:58am UTC](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015/22 "2008-07-04T11:58:21Z")

</div>

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 🙂 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

---

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 5, 2008, 2:34am UTC](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015/23 "2008-07-05T02:34:30Z")

</div>

On Thu, Jul 3, 2008 at 6:48 AM, Rick DeNatale [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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] 🙂

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

---

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 4, 2008, 12:58pm UTC](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015/24 "2008-07-04T12:58:09Z")

</div>

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 🙂  
Cheers  
Robert

[Previous page](https://www.ruby-forum.com/t/ranges-and-enumerable-problems/142015.md?page=1)
