mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
[ruby/prism] Do not warn for unused variables on negative lines
Fixes [Bug #20788]
27e91f21af
This commit is contained in:
parent
d12c8cbf14
commit
b5ecb03ae4
2 changed files with 14 additions and 10 deletions
|
@ -259,6 +259,8 @@ module Prism
|
|||
|
||||
refute_warning("def foo; bar = 1; tap { bar }; end")
|
||||
refute_warning("def foo; bar = 1; tap { baz = bar; baz }; end")
|
||||
|
||||
refute_warning("def foo; bar = 1; end", line: -2, compare: false)
|
||||
end
|
||||
|
||||
def test_void_statements
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue