il Mon, 14 Jun 2004 20:13:42 +0900, "Neil Mc Laughlin" <nml / fjserv.net> ha scritto:: >I'm in the process of writing a logging package for a project. The actual >logging methods can be specified at runtime and are implemented with a class >method_missing call. > >That works fine until I call the warn method using 'send'. I would have >expected the object to respond identically to both the direct invocation and >the indirect invocation via 'send'. > >Is this a bug in ruby or have I missed something? well, you have to consider that warn is already a method in ruby; >> warn 'foo' foo => nil OTOH it works for me: >> def warn(*args) >> p args >> end => nil >> warn 't' , 't', 'y' ["t", "t", "y"] => nil >> self.send :warn , :t,:t,:t,:t [:t, :t, :t, :t] => nil so I believe you did something wrong. But I wonder: why don'tu you use the logger module (that comes with ruby 1.8) or log4r ?