Skip to content

Commit

Permalink
fix for other unknown patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWzr committed Mar 12, 2024
1 parent b3d7a51 commit 00b5a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ def retrieve_completion_data(input, bind:, doc_namespace:)
vars = (bind.local_variables | bind.eval_instance_variables).collect{|m| m.to_s}
perfect_match_var = vars.find{|m| m.to_s == input}
if perfect_match_var
eval("#{perfect_match_var}.class.name", bind)
eval("#{perfect_match_var}.class.name", bind) rescue nil
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
Expand Down

0 comments on commit 00b5a97

Please sign in to comment.