Created
January 21, 2014 20:42
-
-
Save nwjsmith/8547965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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