David Alan Black wrote:
>   def thing(x, b = proc { puts "default" } )
>     if block_given?
>       yield
>     else
	thing x, &b
>     end
>   end
> 
>   thing(1) { puts "associated block" }  #  => "associated block"
    thing(1)                              #  => "default"


[kentda@v128a kentda]$ ruby --version
ruby 1.6.4 (2001-06-04) [i586-linux-gnu]

-- 
<[ Kent Dahl ]>================<[ http://www.stud.ntnu.no/~kentda/ ]>
  )____(stud.techn.;ind.шл.data)||(softwareDeveloper.at(Trustix))_( 
 /"Opinions expressed are mine and not those of my Employer,      "\
( "the University, my girlfriend, stray cats, banana fruitflies,  " )
 \"nor the frontal lobe of my left cerebral hemisphere.           "/