(2013/08/20 19:30), trans (Thomas Sawyer) wrote:
> Also, can it take an optional key argument?
> 
>   def ONCE(k=nil,&b)
>     raise unless block_given?
>     ONCE_MUTEX.synchronize{
>       key = k || caller(3, 1)[0]

I assume that ONCE is keyword like BEGIN{} and END{}.
And key will be a special key provided by compiler.

Completely same feature as /#{...}/o.

-- 
// SASADA Koichi at atdot dot net