From: "ara.t.howard" Date: 2008-08-26T23:42:14+09:00 Subject: Re: Passing a block with define_method On Aug 26, 2008, at 8:30 AM, James Coglan wrote: > Hi list, > > I've got a bit of a problem whereby I need to pass a block to a method > defined using define_method this works: > > def some_method(*args, &block) > # ... > end > > but this does not -- the interpreter complains about unexpected > ampersands: > > define_method(:some_method) do |*args, &block| > # ... > end > > Is there any way to make this work? I'm doing something a little > meta, so I > don't know the name of the method or the number of arguments, so > it's all > got to be dynamic. > module_eval a string. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama