From: MonkeeSage Date: 2006-09-11T12:40:26+09:00 Subject: Re: Struggling with Blocks gwtmp01@mac.com wrote: > A do/end block is simply a snippet of code and a set of variable > bindings that > are made available to the called method. The called method can > ignore the block, > call it one or more times, call it conditionally, pass it along to > some other > method, and so on. That's what I was thinking. do...end / {...} is an implicit closure, begin...end is a simple grouping construct. Also do...end has delayed evaluation (like a quoted expression in Lisp), where begin...end is evaluated immediately. That also means that do...end can be assigned to a name (which results in similar functionality to a Lisp macro; e.g., a = lambda { |x,y| puts x[y] }; a.call({:tree, 'cat'}, :tree)), and can be passed around and so on; but begin...end cannot be. This may help the OP understand the difference a little better: http://www.artima.com/intv/closures.html Regards, Jordan