Bug #8965

SEGV when a refined method is undefined by undef

Added by Shugo Maeda 7 months ago. Updated 7 months ago.

[ruby-dev:47734]
Status:Closed
Priority:Normal
Assignee:Shugo Maeda
Category:core
Target version:2.1.0
ruby -v:ruby 2.1.0dev (2013-09-27 trunk 43073) [i686-linux] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

The following code causes SEGV:

module Foo
refine Object do
def foo
puts "foo"
end
end
end

using Foo

class Object
undef foo
end

foo

I guess undef is not aware of refinements.

History

#1 Updated by Shugo Maeda 7 months ago

  • Status changed from Assigned to Closed

I reported this issue to ruby-dev by accident, so refiled as #8966.

Also available in: Atom PDF