From: Florian Gilcher Date: 2012-03-30T00:20:20+09:00 Subject: Re: Way to identify ambiguity between local-var name and class method name On Mar 29, 2012, at 9:22 AM, Nikolay M. wrote: > Also, I can't find ruby warning, when local variable was created, but > not used. It seems good solution - easy to implement, warnings makes > this bugs more "catchable", total ruby behavior does not changed, > programmers have additional validation tool. Ruby 1.9.3 warns for unused variables if you use `ruby -w`. vagrant@ubuntu-10:~$ cat test.rb def foo a = 10 end foo vagrant@ubuntu-10:~$ ruby -vw test.rb ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] test.rb:2: warning: assigned but unused variable - a Ruby < 1.9.3 does not. Regards, Florian