[MacRuby-devel] [MacRuby] #117: super in overriden #new does not call #initialize
MacRuby
ruby-noreply at macosforge.org
Sun Aug 31 01:06:37 PDT 2008
#117: super in overriden #new does not call #initialize
-----------------------------------+----------------------------------------
Reporter: lsansonetti at apple.com | Owner: lsansonetti at 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/>
More information about the MacRuby-devel
mailing list