yarv-dev:622
From: SASADA Koichi <ko1 atdot.net>
Date: Sun, 18 Sep 2005 01:16:12 +0900
Subject: [yarv-dev:622] Re: calling super without args
ささだです。 sheepman wrote: > こんにちは、sheepman です。 > > ruby と yarv で引数なしの super の振る舞いが違うようです。 > > $ ./miniruby -ve ' > class Base > def initialize(p1, p2 = 1) > p [p1, p2] > end > end > > class Derived < Base > def initialize(p1, p2 = 2) > super > end > end > > Derived.new(0,100) > ' > ruby 1.9.0 (2005-08-19) [i686-linux] > YARVCore 0.3.1 (rev: 256) [opts: ] > [0, 1] > > > $ ruby -ve ' > class Base > def initialize(p1, p2 = 1) > p [p1, p2] > end > end > > class Derived < Base > def initialize(p1, p2 = 2) > super > end > end > > Derived.new(0,100) > ' > ruby 1.9.0 (2005-09-16) [i686-linux] > [0, 100] > > super での呼び出しは optional 引数に対応してません。 -- // SASADA Koichi at atdot dot net // -- ML: yarv-dev quickml.atdot.net 使い方: http://www.atdot.net/~ko1/quickml
615 2005-09-17 13:13 [sheepman sheepman.sa] calling super without args -> 622 2005-09-18 01:16 ┣[ko1 atdot.net ] 734 2005-12-28 11:28 ┗[ko1 atdot.net ]