[MacRuby] #185: Redefining singleton methods on multiple objects at the same place
#185: Redefining singleton methods on multiple objects at the same place ----------------------------------------+----------------------------------- Reporter: vincent.isambart@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ----------------------------------------+----------------------------------- The following code causes a warning. The problem is when 2 different objects have a method defined on their singleton class at the same place. {{{ def func(obj) def obj.a p self.description p self.class.ancestors super end end class A def a end end o1 = A.new o2 = A.new func(o1) func(o2) puts 'o1' o1.a puts 'o2' o2.a }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/185> MacRuby <http://macruby.org/>
#185: Redefining singleton methods on multiple objects at the same place ----------------------------------------+----------------------------------- Reporter: vincent.isambart@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------------+----------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.5 Comment: It seems that trunk doesn't raise any warning anymore. {{{ $ ./miniruby t.rb o1 "#<A:0x20004c440>" [#<Class:#<A:0x20004c440>>, A, NSObject, Kernel] o2 "#<A:0x20004c400>" [#<Class:#<A:0x20004c400>>, A, NSObject, Kernel] }}} I ran the same file with 1.9 after commenting the #description call, it seems to produce the same results. -- Ticket URL: <http://www.macruby.org/trac/ticket/185#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby