diff options
author | Stan Lo <stan001212@gmail.com> | 2023-03-04 23:34:44 +0800 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-03-04 15:34:49 +0000 |
commit | 191e4ae33f5160bdd6f313e752a4eb719c3707b2 (patch) | |
tree | f60d49baff18929faf49375e0142e05cc2d85c04 /test/irb | |
parent | 6f81e38d1d77931e46aee0cb054c9cb3a82f3f3b (diff) |
[ruby/irb] Drop chained methods' completion support
(https://github.com/ruby/irb/pull/529)
Consider completion for this example: `foo.bar.b`
Without type information, it is hard to know the return value of the `bar`
method, so the current implementation interates through `ObjectSpace` to
get all possible candidates for the second method.
In small projects, the performance and accuracy are acceptable. But in
bigger projects, the performance is unacceptable and the accuracy is mostly
poor.
So this commit drops the support for chained methods' completion.
Diffstat (limited to 'test/irb')
-rw-r--r-- | test/irb/test_completion.rb | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index c909b143a4..a16ee5b079 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -336,11 +336,9 @@ module TestIRB bind = obj.instance_exec { binding } assert_include(IRB::InputCompletor.retrieve_completion_data("public_hog", bind: bind), "public_hoge") - assert_include(IRB::InputCompletor.retrieve_completion_data("public_hoge.to_s", bind: bind), "public_hoge.to_s") assert_include(IRB::InputCompletor.retrieve_completion_data("public_hoge", bind: bind, doc_namespace: true), "public_hoge") assert_include(IRB::InputCompletor.retrieve_completion_data("private_hog", bind: bind), "private_hoge") - assert_include(IRB::InputCompletor.retrieve_completion_data("private_hoge.to_s", bind: bind), "private_hoge.to_s") assert_include(IRB::InputCompletor.retrieve_completion_data("private_hoge", bind: bind, doc_namespace: true), "private_hoge") end end |