From 0719e1be11f4e3411b78f5e1d4de553f30f29bb0 Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 10 Feb 2020 23:22:24 +0900 Subject: [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 --- test/irb/test_completion.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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 -- cgit v1.2.3