Skip to content

Instantly share code, notes, and snippets.

@soutaro
Last active June 15, 2016 02:23
Show Gist options
  • Save soutaro/a4665f0366948d0330f7042693da103e to your computer and use it in GitHub Desktop.
Save soutaro/a4665f0366948d0330f7042693da103e to your computer and use it in GitHub Desktop.
ruby -cw
$ cat -n w.rb
1 a = [1]
2
3 a.each do |a|
4 a = 3
5 end
6
7 p a
$ ruby -cw w.rb
w.rb:3: warning: shadowing outer local variable - a
Syntax OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment