yarv-dev-en:4
From: gabriele renzi <surrender_it yahoo.it>
Date: Sun, 18 Dec 2005 15:42:53 -0800 (PST)
Subject: [yarv-dev-en:4] open> can't access class variables from singleton
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
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
--
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]