From: Gregory Brown Date: 2007-02-16T15:23:15+09:00 Subject: Re: functional.rb On 2/16/07, ara.t.howard@noaa.gov wrote: > why not > > harp:~ > cat a.rb > class Object > def tap &b > instance_eval &b > return self > end > end > > puts "foobar".tap{ gsub! /bar/, '' } #=> foo Well that prevents you from being able to access the enclosing scope, but maybe that's okay for a tap. You could always offer both by checking block arity.