зеркало из https://github.com/github/ruby.git
[ruby/irb] Ignore invalid 3 colons in completion
https://github.com/ruby/irb/commit/5e29e3e39c
This commit is contained in:
Родитель
cfbf2bde40
Коммит
3e038ab1c7
|
@ -286,7 +286,7 @@ module IRB
|
|||
all_gvars.grep(Regexp.new(Regexp.quote(gvar)))
|
||||
end
|
||||
|
||||
when /^([^."].*)(\.|::)([^.]*)$/
|
||||
when /^([^.:"].*)(\.|::)([^.]*)$/
|
||||
# variable.func or func.func
|
||||
receiver = $1
|
||||
sep = $2
|
||||
|
|
|
@ -32,6 +32,11 @@ module TestIRB
|
|||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":irb_unknown_symbol_abcdefg", bind: binding))
|
||||
end
|
||||
|
||||
def test_complete_invalid_three_colons
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":::A", bind: binding))
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":::", bind: binding))
|
||||
end
|
||||
|
||||
def test_complete_symbol_failure
|
||||
assert_nil(IRB::InputCompletor::PerfectMatchedProc.(":aiueo", bind: binding))
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче