From: Florian Gross Date: 2004-11-18T03:38:16+09:00 Subject: Re: block-ish expression? itsme213 wrote: > I would like to conveniently create objects and define their methods right > at the point where I want to pass them into a method call. These objects are > a lot like blocks, except that I need more than one interface on them. It sounds a lot like prototype based OOP. I guess something like this will do if you want a simpler syntax than the anonymous Class Bill Atkins suggested: def object(base = Object.new, &block) result = base.clone result.instance_eval(&block) return result end m(a, b, object { def foo() ... end def bar() ... end })