did_you_mean icon indicating copy to clipboard operation
did_you_mean copied to clipboard

Redundant names

Open scivola opened this issue 4 years ago • 3 comments

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

scivola avatar Nov 11 '21 11:11 scivola

What version of Ruby and DidYouMean are you using?

yuki24 avatar Dec 25 '21 01:12 yuki24

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

scivola avatar Dec 25 '21 02:12 scivola

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.

yuki24 avatar Dec 25 '21 05:12 yuki24