Skip to content

Instantly share code, notes, and snippets.

@uasi
Created February 22, 2011 07:13
Show Gist options
  • Save uasi/838328 to your computer and use it in GitHub Desktop.
Save uasi/838328 to your computer and use it in GitHub Desktop.
module Mod1
def hello
puts "Hello from Mod1"
end
end
module Mod2
def hello
puts "Hello from Mod2"
end
end
class Cls1
include Mod1
alias hello_from_mod1 hello
include Mod2
alias hello hello_from_mod1
end
Cls1.new.hello # => Hello from Mod1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment