Create a gist now

Instantly share code, notes, and snippets.

@rcoder /wtf.rb
Created Apr 27, 2011

class A
def foo
"okay!"
end
module B
def foo
"not " + super
end
end
module C
def foo
"really " + super
end
end
end
class X < A
include B
include C
end
if __FILE__ == $0
puts X.new.foo # => prints 'really not okay'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment