[MacRuby] #982: Class#public_instance_methods keeps reporting methods after removing them
#982: Class#public_instance_methods keeps reporting methods after removing them --------------------------------+------------------------------------------- Reporter: manfred@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: --------------------------------+------------------------------------------- When you remove a method from a class it's still reported by public_instance_methods afterwards. However instances don't respond to the method anymore. {{{ class Foo def bar;end end Foo.send(:remove_method, :bar) p Foo.public_instance_methods(true).grep(/bar/) p Foo.new.respond_to?(:bar) p Foo.new.bar }}} In MacRuby nightly: {{{ lsof% macruby t.rb [:bar] false /Users/manfred/Code/mocha/t.rb:7:in `<main>': undefined method `bar' for #<Foo:0x2000cef00> (NoMethodError) }}} On 1.9.2; {{{ lsof% /opt/ruby-1.9.2/bin/ruby t.rb [] false t.rb:7:in `<main>': undefined method `bar' for #<Foo:0x0000010086c878> (NoMethodError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/982> MacRuby <http://macruby.org/>
#982: Class#public_instance_methods keeps reporting methods after removing them --------------------------------+------------------------------------------- Reporter: manfred@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Should be fixed in r4843. -- Ticket URL: <http://www.macruby.org/trac/ticket/982#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby