[前][次][番号順一覧][スレッド一覧][生データ]

yarv-dev-en:126

From: SASADA Koichi <ko1 atdot.net>
Date: Wed, 21 Jun 2006 11:16:25 +0900
Subject: [yarv-dev-en:126] Re: Class variable initialization bug?

Hi,

Carlos Monti wrote:
> I've just begun to play with yarb and I've found out that the
> following works in plain old ruby but not yarv:
> 
> class Base
>  @@var = {'test' => 'test'}
> end
> 
> class IBreakYARV < Base
>    var.replace({'t' => 't'})
> end
> 
> yarb outputs:
> instance.rb:6:in `<class:IBreakYARV>': uninitialized class variable
> @@var in IBreakYARV (NameError)
>        from instance.rb:5:in `<main>'

Ruby 1.9 causes same error.  YARV will be Ruby 2.0 or 1.9.1, so it's no
problem I think.

-- 
// SASADA Koichi at atdot dot net


-- 
ML: yarv-dev-en quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]

       125 2006-06-21 10:48 [slaytanic gfxnstuff.] Class variable initialization bug?      
->     126 2006-06-21 11:16 ┗[ko1 atdot.net       ]