summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-12-12 04:28:16 +0200
committerDmitry Gutov <dgutov@yandex.ru>2016-12-12 04:28:16 +0200
commit67a497fa1cb7f8493f275ed183833cabbceb059d (patch)
treebe41a2bcfcc51c11a519b98adfbfab33094343be
parent6460ddcfcc069d178181d71d16a9d1186d1c9e22 (diff)
downloadpry-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.rb2
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 /^\.([^.]*)$/