[MacRuby] #117: super in overriden #new does not call #initialize
#117: super in overriden #new does not call #initialize -----------------------------------+---------------------------------------- Reporter: lsansonetti@apple.com | Owner: lsansonetti@apple.com Type: defect | Status: new Priority: blocker | Milestone: MacRuby 0.3 Component: MacRuby | Keywords: -----------------------------------+---------------------------------------- {{{ class X def self.new(x); super; end def initialize(x); p x; end end X.new(42) # does not print 42 }}} Clearly it's because the #new that calls #initialize is added on X when it's created and is not a method of the superclass NSObject. -- Ticket URL: <http://www.macruby.org/trac/ticket/117> MacRuby <http://macruby.org/>
#117: super in overriden #new does not call #initialize -----------------------------------+---------------------------------------- Reporter: lsansonetti@apple.com | Owner: lsansonetti@apple.com Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.3 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------------+---------------------------------------- Changes (by lsansonetti@apple.com): * status: new => closed * resolution: => fixed Comment: Fixed in r543/trunk. -- Ticket URL: <http://www.macruby.org/trac/ticket/117#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby