From: Robert Klemme Date: 2011-05-19T15:35:32+09:00 Subject: Re: Generating Functions in Ruby On 19.05.2011 03:55, 7stud -- wrote: > Robert K. wrote in post #999483: >> >> def SUM_TEMPLATE(name, x, y) >> class<> end >> > > I'm curious how you expected the op to use that method? 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 < def SUM_TEMPLATE(name, x, y) > class < end > SUM_TEMPLATE("f",1,2) > p f > CODE 3 But, frankly, this use case seems to be so far away from his real use case that this approach is likely not what is needed. Since I have no further information I stick with the example and leave speculation about the nature of the real issue aside. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/