Subject: [ruby-core:38916] dynamic class causes "class variable access from toplevel" warning
From: Intransition <transfire@ a . m
Date: Thu, 11 Aug 2011 12:29:42 +0900
Why these warnings?
$ cat t.rb
@c = Class.new do
def initialize
@@xx = 10
end
def xx?; @@xx; end
end
c = @c.new
c.xx?
$ ruby t.rb
t.rb:3: warning: class variable access from toplevel
t.rb:5: warning: class variable access from toplevel