Skip to content

Instantly share code, notes, and snippets.

@djberg96
Created June 6, 2012 16:05
Show Gist options
  • Save djberg96/2882935 to your computer and use it in GitHub Desktop.
Save djberg96/2882935 to your computer and use it in GitHub Desktop.
Redefinition warning with 1.9.3
module Process
remove_method :uid
def uid
puts "Hello"
end
module_function :uid
end
Process.uid
=begin
>ruby -W redef_warning.rb
redef_warning.rb:8: warning: method redefined; discarding old uid
Hello
Doesn't happen with 1.8.7 btw.
=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment