Forum: Ruby-dev [ruby-trunk - Bug #8965][Assigned] SEGV when a refined method is undefined by undef

C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 shugo (Shugo Maeda) (Guest)
on 2013-09-29 14:58
(Received via mailing list)
Issue #8965 has been reported by shugo (Shugo Maeda).

----------------------------------------
Bug #8965: SEGV when a refined method is undefined by undef
https://bugs.ruby-lang.org/issues/8965

Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: shugo (Shugo Maeda)
Category: core
Target version: current: 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


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.
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 shugo (Shugo Maeda) (Guest)
on 2013-09-29 15:07
(Received via mailing list)
Issue #8965 has been updated by shugo (Shugo Maeda).

Status changed from Assigned to Closed

I reported this issue to ruby-dev by accident, so refiled as #8966.
----------------------------------------
Bug #8965: SEGV when a refined method is undefined by undef
https://bugs.ruby-lang.org/issues/8965#change-42081

Author: shugo (Shugo Maeda)
Status: Closed
Priority: Normal
Assignee: shugo (Shugo Maeda)
Category: core
Target version: current: 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


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.
This topic is locked and can not be replied to.