commit:     e9549cb1f04b005a112a223f49db1dbfe29b8f8b
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 24 03:05:34 2015 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Tue Feb 24 03:05:34 2015 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/ag.git;a=commit;h=e9549cb1

We do not want to catch NoMethodError from deeper in the stack.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 ag | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ag b/ag
index 644cb4b..00ce189 100755
--- a/ag
+++ b/ag
@@ -247,9 +247,9 @@ end
 
 ###############################################################################
 
-begin
+if self.private_methods.include? $options.action
   send $options.action
-rescue NoMethodError
+else
   abort "Internal Error: Unknown action: #{$options.action}"
 end
 # vim: ts=2 sts=2 et ft=ruby:

Reply via email to