Skip to content

Instantly share code, notes, and snippets.

@maxim
Created January 28, 2009 01:49
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 maxim/53765 to your computer and use it in GitHub Desktop.
Save maxim/53765 to your computer and use it in GitHub Desktop.
module Beer
def drink
"gulp"
end
end
class Mug
include Beer
end
module Lime
def add_lime
"mmm"
end
end
Beer.send :include, Lime
Mug.new.add_lime
# NoMethodError: undefined method `add_lime' for #<Mug:0x507f8>
# from (irb):19
# from :0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment