Skip to content

Instantly share code, notes, and snippets.

@nwjsmith
Created January 21, 2014 20:42
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 nwjsmith/8547965 to your computer and use it in GitHub Desktop.
Save nwjsmith/8547965 to your computer and use it in GitHub Desktop.
module Mixin
def fail
raise "ARRRGH!"
end
alias_method :blurgh, :fail
end
class Includer
include Mixin
def fail
"oops!"
end
end
Includer.new.blurgh # =>
# ~> -:3:in `fail': ARRRGH! (RuntimeError)
# ~> from -:16:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment