yarv-dev:1044
From: sheepman <sheepman sheepman.sakura.ne.jp>
Date: Wed, 19 Jul 2006 22:29:58 +0900
Subject: [yarv-dev:1044] open> protected initialize
こんばんは、sheepman です。
protected っていまだに良く分からないんですが、それはともかく、
protected された initialize の振る舞いが ruby-1.8 や ruby-1.9 と
違います。
$ cat t.rb
class C
protected
def initialize
end
end
C.new
$ ruby-1.9 -v t.rb
ruby 1.9.0 (2006-07-19) [i686-linux]
$ ruby-2.0 -v t.rb
ruby 2.0.0 (Base: Ruby 1.9.0 2006-04-08) [i686-linux]
YARVCore 0.4.1 Rev: 525 (2006-07-18) [opts: [direct threaded code] [inline method cache] ]
t.rb:7:in `new': protected method `initialize' called for #<C:0x40296180> (NoMethodError)
from t.rb:7:in `<main>'
--
sheepman / TAMURA Takashi
sheepman sheepman.sakura.ne.jp
--
ML: yarv-dev quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml
-> 1044 2006-07-19 22:29 [sheepman sheepman.sa] open> protected initialize 1050 2006-07-20 04:15 ┗[ko1 atdot.net ] fixed> Re: open> protected initialize 1051 2006-07-20 08:23 ┣[shudo computer.org ] 1054 2006-07-20 11:01 ┃┗[matz ruby-lang.org ] 1055 2006-07-20 11:02 ┗[matz ruby-lang.org ] 1058 2006-07-20 13:28 ┗[usa garbagecollect.j] 1059 2006-07-20 14:03 ┗[matz ruby-lang.org ] 1060 2006-07-20 14:14 ┗[usa garbagecollect.j] 1061 2006-07-20 14:31 ┗[matz ruby-lang.org ] 1062 2006-07-20 19:55 ┗[usa garbagecollect.j]