Care is needed when setting a value for a class variable; if a class has been inherited, changing the value of a class variable also affects the inheriting classes. This means that it's almost always better to use a class instance variable instead.
class A
@@test = 10
end
class A
@test = 10
end
# OR
class A
def test
@@test # you can access class variable without offense
end
end