Skip to content

Instantly share code, notes, and snippets.

@gnufied
Created June 18, 2010 17:41
Show Gist options
  • Save gnufied/443953 to your computer and use it in GitHub Desktop.
Save gnufied/443953 to your computer and use it in GitHub Desktop.
module Foo
def hello
puts "Hello from Foo"
end
end
module Bar
def self.included(base_klass)
base_klass.class_eval do
alias_method :old_hello, :hello
end
end
end
class Baz
include Foo
include Bar
end
a = Baz.new()
a.old_hello()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment