From: Austin Ziegler Date: 2004-02-20T14:59:53+09:00 Subject: Re: Change to #new (was OpenStruct#initialize to yield self) On Fri, 20 Feb 2004 11:28:58 +0900, Dave Thomas wrote: > On Feb 19, 2004, at 18:37, Austin Ziegler wrote: >> Ugh. I'm not sure that I like that. > I'm not sure you'd notice any difference. If your constructors used a > block, then they'd already have code to deal with it. If they didn't, > then there'd be no change in behavior. class Bar < Foo def initialize(*args, &blk) super instance_eval(blk) end end Would the presence of &blk immediately make super pretend to be super {}? I have code that does the "yield self" and follows your original suggestion of instance_eval for private methods. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2004.02.20 * 00.57.09