Forum: Ruby var scope question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
rtilley (Guest)
on 2006-03-18 18:49
(Received via mailing list)
Is it correct to say that class variables '@@' are similar to globals in
that they are global to their class?
unknown (Guest)
on 2006-03-18 19:08
(Received via mailing list)
Hi --

On Sun, 19 Mar 2006, rtilley wrote:

> Is it correct to say that class variables '@@' are similar to globals in that
> they are global to their class?

Their class, and subclasses of their class.  They're pretty
global-ish.  That's scheduled to be fixed^H^H^H^H^H^H^Hchange in Ruby
2.0, when they'll be visible only to their class/module and the
instance methods inside it (as I understand Matz's description).


David

--
David A. Black (removed_email_address@domain.invalid)
Ruby Power and Light, LLC (http://www.rubypowerandlight.com)

"Ruby for Rails" chapters now available
from Manning Early Access Program! http://www.manning.com/books/black
rtilley (Guest)
on 2006-03-18 19:29
(Received via mailing list)
removed_email_address@domain.invalid wrote:
> Their class, and subclasses of their class.  They're pretty
> global-ish.  That's scheduled to be fixed^H^H^H^H^H^H^Hchange in Ruby
> 2.0, when they'll be visible only to their class/module and the
> instance methods inside it (as I understand Matz's description).

OK, thanks... about the time I fully understand it... things will
probably change :)
Jeff C. (Guest)
on 2006-03-19 08:17
unknown wrote:
> Hi --
> global-ish.  That's scheduled to be fixed^H^H^H^H^H^H^Hchange in Ruby
> 2.0, when they'll be visible only to their class/module and the
> instance methods inside it (as I understand Matz's description).

Any sense of when 2.0 might be released?

Jeff
This topic is locked and can not be replied to.