From: Jeffrey Dik Date: 2005-11-10T04:08:02+09:00 Subject: Re: method_missing What about not using method_missing and catching the NoMethodError exception in the appropriate place? Hope that helps, Jeff On Thu, Nov 10, 2005 at 03:56:27AM +0900, Dirk Meijer wrote: > hi everyone, > i've got a small problem and can't figure out how to solve it. > in my program, you can enter commands, and then it checks if those commands > exist within a module.. > if the command does not exist, it should tell the user that, this gets me to > this: > def method_missing(method,*trash) > print "Command #{method} not found!\n" > end > but when the user enters a command with an argument (only one argument is > read), it prints the following: > Command not found! > Command not found! > which doesn't look very nice.. how would i solve this? > greetings, Dirk.