Issue #1469 has been updated by Yusuke Endoh.
Status changed from Open to Rejected
Hi,
> For 1.9.0: ruby -v reports "ruby 1.9.0 (2006-06-08) [x86_64-linux]"
This is the development version of 1.9.0 that had never been released
yet. The release version 1.9.0-0 (2007-12-26) behaves the same way of
1.9.1p129.
So, this ticket is completely invalid. Thus I close.
FYI, the spec of class variable scope was changed between 1.8 and 1.9.
When class variable of the same name is defined in the parent class,
- 1.8: the original variable remains.
- 1.9: the original variable disappears.
class C
end
class D < C
@@foo = :D
end
class C
@@foo = :C
end
class D
p @@foo #=> :D in 1.8, :C in 1.9
end
According to the draft of ruby-std, it is implementation defined when
the class variable scope is ambiguous.
Anyway, this is certainly intended change, though I don't know the
rationale.
If you are just curious about the rationale, please ask matz in ruby-
core ML or directly in somewhere conference.
If you have some real problem caused by this change, please reopen the
ticket with the problem explanation.
--
Yusuke ENDOH <mame / tsg.ne.jp>
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1469
----------------------------------------
http://redmine.ruby-lang.org