Project

General

Profile

This project is closed and read-only.

Actions

Backport #7843

closed

A weird exception is raised when attempting to remove a "prepend"ed method

Backport #7843: A weird exception is raised when attempting to remove a "prepend"ed method

Added by mame (Yusuke Endoh) over 13 years ago. Updated over 13 years ago.


Description

Hello,

module P
def m; puts "P"; super; end
end
class A
def m; puts "A"; end
prepend P
remove_method :m
#=> undefined method `method_removed' for #<A:0x007f9e1e825618>
end

Is this intentional?

--
Yusuke Endoh

Updated by matz (Yukihiro Matsumoto) over 13 years ago Actions #1 [ruby-core:52210]

No, it must be a bug.

Matz.

Updated by nobu (Nobuyoshi Nakada) over 13 years ago Actions #2

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r39235.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


vm_method.c: fix method_removed

  • vm_method.c: call method_removed hook on called class, not on
    prepending iclass. [ruby-core:52207] [Bug #7843]

Updated by nagachika (Tomoyuki Chikanaga) over 13 years ago Actions #3

  • Tracker changed from Bug to Backport
  • Project changed from Ruby to 15
  • Assignee changed from matz (Yukihiro Matsumoto) to nagachika (Tomoyuki Chikanaga)
  • Target version deleted (2.6)
Actions

Also available in: PDF Atom