Skip to content

Instantly share code, notes, and snippets.

@bsimpson bsimpson/test.rb forked from cpjolicoeur/test.rb
Created Nov 9, 2012

Embed
What would you like to do?
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
You can’t perform that action at this time.