Ruby

Ruby

Made by DeepSource

Function argument overwritten before use RB-LI1064

Bug risk
Major

A function argument is shadowed. It is usually a result of a typo.

Bad practice

do_something do |foo|
  foo = 42
  puts foo
end

Recommended

do_something do |foo|
  foo = foo + 42
  puts foo
end