did_you_mean
did_you_mean copied to clipboard
Redundant names
def foo
end
foo = 1
boo
# => x.rb:6:in `<main>': undefined local variable or method `boo' for main:Object (NameError)
# Did you mean? foo
# foo
What version of Ruby and DidYouMean are you using?
I’m sorry. I forgot to write such important information.
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [arm64-darwin20] did_you_mean 1.6.1
Thank you @scivola, I was able to reproduce this bug. Apparently there could be duplicate names when there is a method and a variable that both have the same same.