K
Kroeger Simon (ext)
I'm puzzled:
-----------------------
class X
A =3D 1
def X.a
A
end
end
class Y < X
A =3D 2
end
class Z < X
A =3D 3
def Z.a
A
end
end
p X.a #=3D> 1
p Y.a #=3D> 1
p Z.a #=3D> 3
-----------------------
(ruby 1.8.2 (2004-12-25) [i386-mswin32])
Shouldn't this yield at least a warning?
Is this a feature?
cheers
Simon
-----------------------
class X
A =3D 1
def X.a
A
end
end
class Y < X
A =3D 2
end
class Z < X
A =3D 3
def Z.a
A
end
end
p X.a #=3D> 1
p Y.a #=3D> 1
p Z.a #=3D> 3
-----------------------
(ruby 1.8.2 (2004-12-25) [i386-mswin32])
Shouldn't this yield at least a warning?
Is this a feature?
cheers
Simon