diff options
author | aycabta <aycabta@gmail.com> | 2020-02-10 23:22:24 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-02-12 13:14:28 +0900 |
commit | 0719e1be11f4e3411b78f5e1d4de553f30f29bb0 (patch) | |
tree | 9732475411dc9b60b2ebacdb94722776387d6213 /test | |
parent | 3af3431c2c145134996e66f3d8d9ade8ad81bde0 (diff) |
[ruby/irb] Check doc namespace correctly
IRB::InputCompletor::PerfectMatchedProc crashes when doc not found because a
variable name was incorrect.
https://github.com/ruby/irb/commit/889fd4928f
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_completion.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index e5a1f4d586..cb6da5b1f2 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -31,5 +31,9 @@ module TestIRB assert_include(IRB::InputCompletor.retrieve_completion_data(":a", bind: binding), ":aiueo") assert_empty(IRB::InputCompletor.retrieve_completion_data(":abcdefg", bind: binding)) end + + def test_complete_symbol_failure + assert_nil(IRB::InputCompletor::PerfectMatchedProc.(":aiueo", bind: binding)) + end end end |