From: ahoward Date: 2003-04-27T02:08:55+09:00 Subject: Re: yield self On Sat, 26 Apr 2003, Mauricio [iso-8859-1] Fern�ndez wrote: > Do you mean this? yes. thanks! > > >> def with(object, &block) > >> object.instance_eval(&block) > >> end > => nil > >> with "1" do > ?> puts "My length is #{length}" > >> end > My length is 1 > => nil > > As usual, all rights reserved, etc; BTW I prefer cheques payable to bearer > ;-) At least 80% of the profits will be reinvested in food for my brain (*) > so that I can go on posting here. do you take paypal? ;-) > The way "new syntax" can be added so easily to Ruby never ceases to amaze > me. amongst other things - agreed. -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ara.t.howard@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================