Aldric Giacomoni wrote:
[...]
> So.. Proc and Lambda are .. Pretty much the same thing, according to 
> Ruby.

Not quite.  There's no such class as Lambda.  Read what I said in my 
first post again.

> 
> So they really are "bits of code with its own environment" ?
> When is that useful? Maybe I need to watch Dave Thomas' presentation 
> again.. :)

Closures are useful for certain things and in certain styles of 
programming.  In Rails they're occasionally used for callbacks, and in 
RSpec I often do things like
lambda {Car.drive}.should_not raise_error

See http://en.wikipedia.org/wiki/Closure_(computer_science) for more.

> 
> Thanks, Marnen.

You're welcome!

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen / marnen.org
-- 
Posted via http://www.ruby-forum.com/.