From: Austin Ziegler Date: 2005-01-29T09:33:42+09:00 Subject: Re: how do i turn an object into a binding? On Sat, 29 Jan 2005 07:29:59 +0900, Florian Frank wrote: > Bret Pettichord wrote: > > > how? > > foo.instance_eval do > bar > baz(1) > bagaloo('didoo') > end Note that this won't work if you try to use assignment, because that will be interpreted as a local variable. 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 -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca