Browse files

Teach CommandT::Stub to handle show_buffer_finder

If for some reason you didn't compile the extension before trying to use
the buffer finder you would trigger an error because the CommandT::Stub
class didn't implement the #show_buffer_finder method.

As the number of stubbed methods has now reached three, this commit also
includes a refactoring to eliminate the repetition in the method

Signed-off-by: Wincent Colaiuta <>
  • Loading branch information...
wincent committed Aug 31, 2011
1 parent 3c0dc0a commit a353ea1994cf0bc41d00a506afab572663137043
Showing with 2 additions and 6 deletions.
  1. +2 −6 ruby/command-t/stub.rb
@@ -27,12 +27,8 @@ class Stub
'Please see INSTALLATION and TROUBLE-SHOOTING in the help',
'For more information type: :help command-t']
- def show_file_finder
- warn *@@load_error
- end
- def flush
- warn *@@load_error
+ [:flush, :show_buffer_finder, :show_file_finder].each do |method|
+ define_method(method.to_sym) { warn *@@load_error }

0 comments on commit a353ea1

Please sign in to comment.