Actions
Bug #7842
closedAn alias of a "prepend"ed method skips the original method when calling super
Description
Hello,
module P
def m; puts "P"; super; end
end
class A
def m; puts "A"; end
end
class B < A
def m; puts "B"; end
prepend P
alias m2 m
end
B.new.m2
#=> expected: P, B, A
#=> actual: P, A
Is this intentional?
It looks weird to me that calling super of P#m
(as m2
) skips A#m
.
Yusuke Endoh mame@tsg.ne.jp
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0