mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] Ignore parenthesis during completion
Rename method https://github.com/ruby/irb/commit/619aecb412
This commit is contained in:
parent
38d255d023
commit
5c646ca0a0
2 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue