mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Ensure module candidates are ordered consistently
This gets rid of annoying implementation specific ordering, at the expense of adding our own arbitrary ordering to the mix.
This commit is contained in:
parent
b10403894a
commit
53c39fdac3
1 changed files with 1 additions and 1 deletions
|
@ -327,7 +327,7 @@ class Pry
|
|||
|
||||
ims = all_relevant_methods_for(wrapped)
|
||||
@all_source_locations_by_popularity = ims.group_by { |v| Array(v.source_location).first }.
|
||||
sort_by { |k, v| -v.size }
|
||||
sort_by { |k, v| [-v.size, k] }
|
||||
end
|
||||
|
||||
# We only want methods that have a non-nil `source_location`. We also
|
||||
|
|
Loading…
Reference in a new issue