Austin Ziegler wrote: >Note that this won't work if you try to use assignment, because that >will be interpreted as a local variable. > True. In this case 'self' could be used: foo.instance_eval do self.quux = true end If assignment methods haven't yet been defined in a class definition, the same problem occurs. >Better: > > module Kernel > def with(obj) > yield self if block_given? > end > end > > with longfooname do |f| > f.bar > f.baz(1) > f.bagaloo('didoo') > end > >-austin > > Well, than you could do f = longfooname at the beginning as well. ;) -- Florian Frank