1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Suppress "assigned but unused variable" warning

https://github.com/ruby/irb/commit/a1ddf64c69
This commit is contained in:
aycabta 2021-09-04 05:41:37 +09:00 committed by git
parent 9ac32e87bb
commit ff372ed74b

View file

@ -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")