Skip to content

Instantly share code, notes, and snippets.

@kentaro
Created March 4, 2014 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentaro/9343602 to your computer and use it in GitHub Desktop.
Save kentaro/9343602 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -w
def foo
puts "foo"
end
def foo
puts "redefined"
end
foo
__END__
/Users/antipop/tmp/foo.rb:7: warning: method redefined; discarding old foo
/Users/antipop/tmp/foo.rb:3: warning: previous definition of foo was here
redefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment