Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@rcoder /wtf.rb
Created

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
Something went wrong with that request. Please try again.