Project

General

Profile

Bug #9475 ยป test.rb

benweint (Ben Weintraub), 02/03/2014 08:21 PM

 
module A
def foo
puts "foo from A"
end
end

class B
include A

def foo
puts "foo from B"
super
end
end

class C < B
alias_method :orig_foo, :foo

def foo
puts "foo from C"
orig_foo
end
end

class B
alias_method :orig_foo, :foo

def foo
puts "foo from B (again)"
orig_foo
end
end

C.new.foo
    (1-1/1)