diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2016-12-12 04:28:16 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2016-12-12 04:28:16 +0200 |
commit | 67a497fa1cb7f8493f275ed183833cabbceb059d (patch) | |
tree | be41a2bcfcc51c11a519b98adfbfab33094343be | |
parent | 6460ddcfcc069d178181d71d16a9d1186d1c9e22 (diff) | |
download | pry-67a497fa1cb7f8493f275ed183833cabbceb059d.tar.gz |
Move uniq! before sort!
uniq! uses a hash table anyway.
But now sort! needs to deal with a shorter list.
-rw-r--r-- | lib/pry/input_completer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pry/input_completer.rb b/lib/pry/input_completer.rb index 1810f078..cbfd845f 100644 --- a/lib/pry/input_completer.rb +++ b/lib/pry/input_completer.rb @@ -178,8 +178,8 @@ class Pry::InputCompleter candidates.concat m.instance_methods(false).collect(&:to_s) end } - candidates.sort! candidates.uniq! + candidates.sort! end select_message(path, receiver, message, candidates) when /^\.([^.]*)$/ |