On Wednesday 22 January 2003 05:43 pm, Hal E. Fulton wrote:

| This is general enough that it even covers
| what I call the "non-iterating iterator."
| This comes in one or two varieties, but the
| most common/intuitive is the "open-close"
| kind. See File#open for an example, or
| Mutex#synchronize, or the newer form of
| Dir.chdir (1.7.x).

Just because it uses a block doesn't make it an iterator; a block is used in 
itaration, it does not comprise an iterator.  

File::open, Dir::chdir, and Mutex#synchronize are not 'non-iterating 
iterators,' they are merely... not... iterators... because they... don't... 
iterate-- they just make use of a handy block (unless someone wants to coin 
the phrase 'code between an iteration of state').

-- Bruce

-- 
Bruce R. Williams :: [iusris/#ruby-lang] :: http://www.codedbliss.com

  'It does not require a majority to prevail, but rather an irate,
  tireless minority keen to set brush fires in people's minds.'
  -- Samuel Adams