Hi. Can someone explain this code to me:
class A
@@VAR = {'A'=>1}
def initialize
puts @@VAR
end
end
class C < A
@@VAR = {'C'=>1}
end
class B < A
@@VAR = {'B'=>1}
end
b=B.new
c=C.new
a=A.new
This produce this output:
B1
B1
B1
While I expect it to produce
B1
C1
A1
--
((lambda (foo) (bar foo)) (baz))