# Ranges

**URL:** https://rubytalk.org/t/ranges/195
**Category:** ruby-talk
**Created:** [10 June 2002 19:15 UTC](https://rubytalk.org/t/ranges/195 "2002-06-10T19:15:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Marcin\_Qrczak\_Kowalc](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@Marcin\_Qrczak\_Kowalc](https://rubytalk.org/u/Marcin_Qrczak_Kowalc)
#### Post date: [10 June 2002 19:15 UTC](https://rubytalk.org/t/ranges/195/1 "2002-06-10T19:15:05Z")

</div>

Tue, 11 Jun 2002 01:02:03 +0900, Peter Hickman [peter@semantico.com](mailto:peter@semantico.com) pisze:

> Is there a particular reason why
> 
> (10…1).each {|n| puts n}
> 
> doesn’t do the reverse of
> 
> (1…10).each {|n| puts n}

Yes: ‘(1…n).each {|n| puts n}’ should print n numbers, even if n == 0.

> **···**
>
> –  
> \_\_("\< Marcin Kowalczyk \* qrczak@knm.org.pl [http://qrczak.ids.net.pl/](http://qrczak.ids.net.pl/)  
> \_\_/  
> ^^  
> QRCZAK
