[ruby/irb] Ignore parenthesis during completion
Rename method https://github.com/ruby/irb/commit/619aecb412
This commit is contained in:
parent
38d255d023
commit
5c646ca0a0
@ -197,7 +197,7 @@ module IRB
|
||||
end
|
||||
candidates.grep(/^#{Regexp.quote(sym)}/)
|
||||
|
||||
when /^::([A-Z][^:\.\(]*)$/
|
||||
when /^::([A-Z][^:\.\(\)]*)$/
|
||||
# Absolute Constant or class methods
|
||||
receiver = $1
|
||||
candidates = Object.constants.collect{|m| m.to_s}
|
||||
|
@ -41,6 +41,13 @@ module TestIRB
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data(":::", bind: binding))
|
||||
end
|
||||
|
||||
def test_complete_absolute_constants_with_special_characters
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data("::A:", bind: binding))
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data("::A.", bind: binding))
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data("::A(", bind: binding))
|
||||
assert_empty(IRB::InputCompletor.retrieve_completion_data("::A)", bind: binding))
|
||||
end
|
||||
|
||||
def test_complete_symbol_failure
|
||||
assert_nil(IRB::InputCompletor::PerfectMatchedProc.(":aiueo", bind: binding))
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user