yarv-dev-en:5
From: SASADA Koichi <ko1 atdot.net>
Date: Tue, 20 Dec 2005 01:38:03 +0900
Subject: [yarv-dev-en:5] fixed> Re: open> can't access class variables from singleton
Hi, Thanks for your report. I fixed it. Please check it. gabriele renzi wrote: > With > - win xp pro sp2 > - mingw 3.4 > - ruby 1.9.0 (2005-12-17) [i386-mingw32] > this test fails with: > > 1) Failure: > test_cvar_from_singleton(TestBIN) > [C:/Documents and > Settings/gabriele/Desktop/Dev/yarv/yarvtest/yarvtest.rb:10 > 7:in `ae' > C:/Documents and > Settings/gabriele/Desktop/Dev/yarv/yarvtest/test_bin.rb:25 > 8:in `test_cvar_from_singleton']: > <"2\n"> expected but was > <"">. > > Patch containg two tests: > > Index: test_bin.rb > =================================================================== > --- test_bin.rb (revision 314) > +++ test_bin.rb (working copy) > @@ -244,6 +244,35 @@ > end > end > > + def test_cvar_from_singleton > + ae %q{ > +class C > + @@c=1 > + class << self > + def m > + @@c += 1 > + end > + end > +end > +C.m > + } do > + remove_const :C > + end > + end > + > + def test_cvar_from_singleton2 > + ae %q{ > +class C > + @@c = 1 > + def self.m > + @@c += 1 > + end > +end > +C.m > + } do > + remove_const :C > + end > + end > def test_op_asgin2 > ae %q{ > class C > -- // SASADA Koichi at atdot dot net -- ML: yarv-dev-en quickml.atdot.net Info: http://www.atdot.net/~ko1/quickml
4 2005-12-19 08:42 [surrender_it yahoo.i] open> can't access class variables from singleton -> 5 2005-12-20 01:38 ┗[ko1 atdot.net ] fixed> Re: open> can't access class variables from singleton 6 2005-12-20 05:34 ┗[surrender_it yahoo.i]