# Syntax: iter?

**URL:** <https://www.ruby-forum.com/t/syntax-iter/116799>\
**Category:** Ruby\
**Created:** [October 9, 2007, 10:01pm UTC](https://www.ruby-forum.com/t/syntax-iter/116799 "2007-10-09T22:01:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 9, 2007, 10:01pm UTC](https://www.ruby-forum.com/t/syntax-iter/116799/1 "2007-10-09T22:01:51Z")

</div>

The Rubinius specs refer to an iter statement. I have vague memories  
of one existing but couldn’t find any doc of it in the Pickaxe, and I  
don’t have my other books around. Am I dreaming?

> > iter  
> > NameError: undefined local variable or method `iter’ for main:Object  
> > from (irb):1

–  
Giles B.

Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com/](http://giles.tumblr.com/)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 9, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/syntax-iter/116799/2 "2007-10-09T22:21:52Z")

</div>

On Oct 9, 2007, at 13:01 , Giles B. wrote:

> The Rubinius specs refer to an iter statement. I have vague memories  
> of one existing but couldn’t find any doc of it in the Pickaxe, and I  
> don’t have my other books around. Am I dreaming?
> 
> > > iter  
> > > NameError: undefined local variable or method `iter’ for main:Object  
> > > from (irb):1

You are dreaming.

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 10, 2007, 6:58am UTC](https://www.ruby-forum.com/t/syntax-iter/116799/3 "2007-10-10T06:58:37Z")

</div>

On Oct 9, 2007, at 13:01 , Giles B. wrote:

> The Rubinius specs refer to an iter statement. I have vague memories  
> of one existing but couldn’t find any doc of it in the Pickaxe, and I  
> don’t have my other books around. Am I dreaming?

Prolly not an iter statement… Prolly iter expressions/ASTs:

% echo “[].each {}” | parse\_tree\_show -  
s(:iter, s(:call, s(:zarray), :each), nil)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 9, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/syntax-iter/116799/4 "2007-10-09T22:41:49Z")

</div>

> > The Rubinius specs refer to an iter statement. I have vague memories  
> > of one existing but couldn’t find any doc of it in the Pickaxe, and I  
> > don’t have my other books around. Am I dreaming?
> > 
> > > > iter  
> > > > NameError: undefined local variable or method `iter’ for main:Object  
> > > > from (irb):1
> 
> You are dreaming.

It happens.

–  
Giles B.

Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com/](http://giles.tumblr.com/)

---

<div class="post-metadata">

**Author:** ![Giles\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/848f3c/32.png) [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Post date:** [October 10, 2007, 9:29am UTC](https://www.ruby-forum.com/t/syntax-iter/116799/5 "2007-10-10T09:29:17Z")

</div>

> > The Rubinius specs refer to an iter statement. I have vague memories  
> > of one existing but couldn’t find any doc of it in the Pickaxe, and I  
> > don’t have my other books around. Am I dreaming?
> 
> Prolly not an iter statement… Prolly iter expressions/ASTs:
> 
> % echo “[].each {}” | parse\_tree\_show -  
> s(:iter, s(:call, s(:zarray), :each), nil)

yeah, I think that’s it.

–  
Giles B.

Blog: [http://gilesbowkett.blogspot.com](http://gilesbowkett.blogspot.com)  
Portfolio: [http://www.gilesgoatboy.org](http://www.gilesgoatboy.org)  
Tumblelog: [http://giles.tumblr.com/](http://giles.tumblr.com/)
