From ff372ed74b4cedd8252e589d2b89c59b0bd8d763 Mon Sep 17 00:00:00 2001 From: aycabta Date: Sat, 4 Sep 2021 05:41:37 +0900 Subject: [PATCH] [ruby/irb] Suppress "assigned but unused variable" warning https://github.com/ruby/irb/commit/a1ddf64c69 --- test/irb/test_completion.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/irb/test_completion.rb b/test/irb/test_completion.rb index 1fd42999c6..c534301bc6 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -86,6 +86,7 @@ module TestIRB def test_complete_variable str_example = '' + str_example.clear # suppress "assigned but unused variable" warning assert_include(IRB::InputCompletor.retrieve_completion_data("str_examp", bind: binding), "str_example") assert_equal(IRB::InputCompletor.retrieve_completion_data("str_example", bind: binding, doc_namespace: true), "String") assert_equal(IRB::InputCompletor.retrieve_completion_data("str_example.to_s", bind: binding, doc_namespace: true), "String.to_s")