Skip to content

Instantly share code, notes, and snippets.

@cpjolicoeur
Created November 8, 2012 21:47
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 cpjolicoeur/4041901 to your computer and use it in GitHub Desktop.
Save cpjolicoeur/4041901 to your computer and use it in GitHub Desktop.
module Foo
def say(text)
puts "Foo::say #{text}"
end
end
class Craig
include Foo
def say(text)
super
puts "Craig say: #{text}"
end
end
c = Craig.new
c.say('hello')
---
cpjolicoeur $ ruby test.rb
Foo::say hello
Craig say: hello
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment