From: Austin Ziegler Date: 2007-11-05T21:40:33+09:00 Subject: Re: def blah do |x| -- alternate method definition syntax On 11/5/07, Joe Holt wrote: > Thanks matz and all. The define_method() trick hadn't occurred to me > -- almost the same, indeed. Why couldn't block parameter syntax be > extended to accept optional args: do |x, y=0| ? I Realize that this is > only meaningful for the hypothetical def usage, but come to think of > it I see no reason blocks couldn't accept optional args in cases where > they're .called(). > > And doesn't calling a proc with [] smell like a cute hack (hey, we've > got this bracket method...) to anyone else? Nope. Not something that seems odd at all after five years of using Ruby. ;) -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca