Robert K. wrote in post #999582:
>
> I am not sure I get your point.  The method was intended to be used as a
> top level method similarly to how he formulated his C macro sample.
>
> $ ruby19 <<CODE
>  > def SUM_TEMPLATE(name, x, y)
>  >   class <<self;self;end.class_eval "def #{name}; #{x} + #{y}; end"
>  > end
>  > SUM_TEMPLATE("f",1,2)
>  > p f
>  > CODE
> 3
>

Oh, okay.  But that isn't a class method.

-- 
Posted via http://www.ruby-forum.com/.