From: Joel VanderWerf Date: 2004-06-15T07:33:50+09:00 Subject: Re: method_missing and send Jean-Hugues ROBERT wrote: > As a side note, you may want to consider a solution > using blocks: > > def trace( domain = :debug, &block ) > if $domains[domain] then > p block.call() > end > end Nice. Small point: it's more efficient to use yield than to instantiate a Proc: def trace( domain = :debug) if $domains[domain] then p yield end end Even if the trace is disabled, the &block construct will instantiate a Proc.