yarv-dev:615
From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Sat, 17 Sep 2005 13:13:54 +0900
Subject: [yarv-dev:615] calling super without args
こんにちは、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]
--
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp http://sheepman.parfait.ne.jp/
--
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 ]