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

tool/mk_builtin_loader.rb: prevent "assigned but unused variable"

This commit is contained in:
Yusuke Endoh 2020-12-12 23:09:11 +09:00
parent 4d2ad8d737
commit 248f1ef282

View file

@ -52,7 +52,7 @@ def make_cfunc_name inlines, name, lineno
end
def collect_locals tree
type, name, (line, cols) = tree
_type, name, (line, _cols) = tree
if locals = LOCALS_DB[[name, line]]
locals
else
@ -65,7 +65,7 @@ end
def collect_builtin base, tree, name, bs, inlines, locals = nil
while tree
call = recv = sep = mid = args = nil
recv = sep = mid = args = nil
case tree.first
when :def
locals = collect_locals(tree[1])