From: ts Date: 2003-11-17T10:21:56+09:00 Subject: Re: overload method in module_eval, how? >>>>> "S" == Simon Strandgaard writes: S> class Object S> def self.debug(*args) S> args.each{|method| S> name = method.id2name S> org = "_debug_"+name S> code=< alias #{org} #{name} S> def #{name}(*a,&b) def #{name}(&b) S> $stdout.puts("before") S> #{org}(*a,&b) #{org}(&b) S> $stdout.puts("after") S> end S> private :#{org} S> MSG S> module_eval code S> } S> end S> end S> class TestDbg < Test::Unit::TestCase S> def test_x The arity for a test method must be == 0 -- Guy Decoux