diff options
author | Imir Kiyamov <makketagg@gmail.com> | 2022-07-18 19:45:38 +0300 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-10-05 19:22:13 +0900 |
commit | 83a6213f31016e16bf43613beb4d058339ca9350 (patch) | |
tree | 51cac0156e0346b2ca8591a70043823fdc7a14cc /lib | |
parent | 107acbd9a475f74be89e63fbb12c11593692b59f (diff) |
[ruby/irb] Fixed sort of variables in completion
https://github.com/ruby/irb/commit/5842888255
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/completion.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/completion.rb b/lib/irb/completion.rb index 0e34fc63aa..35767feeb7 100644 --- a/lib/irb/completion.rb +++ b/lib/irb/completion.rb @@ -373,7 +373,7 @@ module IRB if doc_namespace "String.#{candidates.find{ |i| i == message }}" else - select_message(receiver, message, candidates) + select_message(receiver, message, candidates.sort) end else @@ -390,7 +390,7 @@ module IRB else candidates = (bind.eval_methods | bind.eval_private_methods | bind.local_variables | bind.eval_instance_variables | bind.eval_class_constants).collect{|m| m.to_s} candidates |= ReservedWords - candidates.grep(/^#{Regexp.quote(input)}/) + candidates.grep(/^#{Regexp.quote(input)}/).sort end end end |