Skip to content

Instantly share code, notes, and snippets.

@jashmenn
Created May 26, 2009 23:53
Show Gist options
  • Save jashmenn/118370 to your computer and use it in GitHub Desktop.
Save jashmenn/118370 to your computer and use it in GitHub Desktop.
module B
def whisper(a)
puts a.downcase
end
end
class Class
include B
def say(a)
puts a
end
end
class A
say("hi")
whisper("BYE")
end
# ruby 1.8.* & 1.9.* =>
# hi
# bye
#
# macruby 0.0.4 =>
# hi
# class.rb:16:in `<class:A>': undefined method `whisper' for A:Class (NoMethodError)
# from class.rb:14:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment