From: Xavier Noria Date: 2011-03-29T00:22:43+09:00 Subject: Re: with block in ruby On Mon, Mar 28, 2011 at 5:05 PM, Mario Ruiz wrote: > is there any way in ruby to do something like: > > with thisobject do >  .... > > > end Yes, you can accomplish that with instance_eval: def with(obj, &block) obj.instance_eval &block end with [] do p length # => 0 end -- fxn