Skip to content

Commit

Permalink
method missing matches a command if it's fully typed out
Browse files Browse the repository at this point in the history
  • Loading branch information
cldwalker committed Sep 28, 2009
1 parent 9fd93a9 commit a1977bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions boson/commands/boson_method_missing.rb
Expand Up @@ -9,6 +9,7 @@ class << Boson.main_object
Boson::Index.read
possible_commands = Boson::Index.commands.map {|e| [e.name, e.alias]}.flatten.compact.sort
meths = _underscore_search(meth.to_s, possible_commands)
((exact_meth = meths.find {|e| possible_commands.include?(e) }) && meths = [exact_meth])
if meths.size > 1
puts "Multiple commands match: #{meths.join(', ')}"
else
Expand Down

0 comments on commit a1977bb

Please sign in to comment.