[ruby/irb] Avoid slow symbol completion when completion target is an
empty symbol (https://github.com/ruby/irb/pull/534) https://github.com/ruby/irb/commit/35697f3ef3
This commit is contained in:
parent
a2b776a9b7
commit
b49053a6be
@ -215,7 +215,7 @@ module IRB
|
||||
select_message(receiver, message, proc_candidates | hash_candidates)
|
||||
end
|
||||
|
||||
when /^(:[^:.]*)$/
|
||||
when /^(:[^:.]+)$/
|
||||
# Symbol
|
||||
if doc_namespace
|
||||
nil
|
||||
|
@ -292,6 +292,8 @@ module TestIRB
|
||||
_ = :aiueo
|
||||
assert_include(IRB::InputCompletor.retrieve_completion_data(":a", bind: binding), ":aiueo")
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":irb_unknown_symbol_abcdefg", bind: binding))
|
||||
# Do not complete empty symbol for performance reason
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":", bind: binding))
|
||||
end
|
||||
|
||||
def test_complete_invalid_three_colons
|
||||
|
Loading…
x
Reference in New Issue
Block a user