From: "ko1 (Koichi Sasada)" <redmine@...>
Date: 2013-02-22T08:57:30+09:00
Subject: [ruby-core:52644] [ruby-trunk - Bug #7842] An alias of a "prepend"ed method skips the original method when calling super


Issue #7842 has been updated by ko1 (Koichi Sasada).

Assignee set to nobu (Nobuyoshi Nakada)
Target version changed from next minor to 2.1.0

marcandre: why you remove assignee?
you mean specification discussion was finished at [ruby-core:52386]#5?
I assume the reason and I assign this ticket nobu, the patch monster.

----------------------------------------
Bug #7842: An alias of a "prepend"ed method skips the original method when calling super
https://bugs.ruby-lang.org/issues/7842#change-36729

Author: mame (Yusuke Endoh)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: core
Target version: 2.1.0
ruby -v: ruby 2.0.0dev (2013-02-13 trunk 39225) [x86_64-linux]


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>


-- 
http://bugs.ruby-lang.org/