[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-core
Subject:    [ruby-core:57466] [ruby-trunk - Bug #8966][Assigned] SEGV when a refined method is undefined by unde
From:       "shugo (Shugo Maeda)" <redmine () ruby-lang ! org>
Date:       2013-09-29 13:05:41
Message-ID: redmine.issue-8966.20130929220541 () ruby-lang ! org
[Download RAW message or body]


Issue #8966 has been reported by shugo (Shugo Maeda).

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

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.


-- 
http://bugs.ruby-lang.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic