From: Christian Neukirchen Date: 2005-10-14T21:57:25+09:00 Subject: Re: Default argument values for blocks "David A. Black" writes: > Hi -- > > On Fri, 14 Oct 2005, Gyoung-Yoon Noh wrote: > >> +1 >> >> collection.each : (foo="bar") { puts foo } >> >> It looks like 'when condition : expression' branch in >> 'case' statement. > > But why would you want a method call and argument list and block to > look like when condition : expression ? There's no "then" meaning to > it. Read the : as "do". When x is one, do... For every item of the collection, do... I think the :(){} stuff is the nicest looking approach as of now, but I wouldn't use it when ordinary {||} is enough. > David -- Christian Neukirchen http://chneukirchen.org