From: Morton Goldberg Date: 2006-09-12T08:51:00+09:00 Subject: Re: Struggling with Blocks On Sep 11, 2006, at 1:55 PM, Rick DeNatale wrote: > So, what's the real deal with BEGIN..END. What it really does is to > delimit a series of statements which are treated like an anonymous > method which is called in place. That's what I thought until recently, but there is a difference. Consider: a = 1 begin a = 2 b = 3 p [a, b] # => [2, 3] end p a # => 2 p b # => 3 If the begin ... end behaved _exactly_ like an anonymous method, we would see: a = 1 begin a = 2 b = 3 p [a, b] # => [2, 3] end p a # => 1 p b # => raises NameError Frankly, I would be happier with the latter behavior. Regards, Morton