ruby-changes:67595
From: aycabta <ko1@a...>
Date: Sat, 4 Sep 2021 17:48:43 +0900 (JST)
Subject: [ruby-changes:67595] ff372ed74b (master): [ruby/irb] Suppress "assigned but unused variable" warning
https://git.ruby-lang.org/ruby.git/commit/?id=ff372ed74b From ff372ed74b4cedd8252e589d2b89c59b0bd8d763 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Sat, 4 Sep 2021 05:41:37 +0900 Subject: [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 1fd4299..c534301 100644 --- a/test/irb/test_completion.rb +++ b/test/irb/test_completion.rb @@ -86,6 +86,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_completion.rb#L86 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") -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/