Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Created August 25, 2011 00:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jaredatron/1169673 to your computer and use it in GitHub Desktop.
Save jaredatron/1169673 to your computer and use it in GitHub Desktop.
module One
def go
puts 1
end
end
module Two
def go
puts 2
end
end
obj = Module.new
obj.extend One
obj.extend Two
puts obj.go
obj.extend One.clone
puts obj.go
obj.extend Two.clone
puts obj.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment