Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/irb/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def self.retrieve_completion_data(input, bind: IRB.conf[:MAIN_CONTEXT].workspace
select_message(receiver, message, proc_candidates | hash_candidates)
end

when /^(:[^:.]*)$/
when /^(:[^:.]+)$/
# Symbol
if doc_namespace
nil
Expand Down
2 changes: 2 additions & 0 deletions test/irb/test_completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ def test_complete_symbol
_ = :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
Expand Down