Skip to content

Instantly share code, notes, and snippets.

@bsimpson
Forked from cpjolicoeur/test.rb
Created November 9, 2012 14:13
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 bsimpson/4045903 to your computer and use it in GitHub Desktop.
Save bsimpson/4045903 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