summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-03-03 22:41:17 +0900
committergit <svn-admin@ruby-lang.org>2023-03-03 13:41:21 +0000
commitb49053a6be3cc449678609f62048b7aed3a1f839 (patch)
tree994b84b551dbe65e5b0308bc64819c5f0c6ccd8c /test/irb
parenta2b776a9b7f5fc039025a8b92bfbdf3ab0968ce1 (diff)
downloadruby-b49053a6be3cc449678609f62048b7aed3a1f839.tar.gz
[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
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_completion.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb
index b93b5e804a..c909b143a4 100644
--- a/test/irb/test_completion.rb
+++ b/test/irb/test_completion.rb
@@ -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