[#1816] Ruby 1.5.3 under Tru64 (Alpha)? — Clemens Hintze <clemens.hintze@...>

Hi all,

17 messages 2000/03/14

[#1989] English Ruby/Gtk Tutorial? — schneik@...

18 messages 2000/03/17

[#2241] setter() for local variables — ts <decoux@...>

18 messages 2000/03/29

[ruby-talk:01976] Re: Class Variables

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-03-17 14:53:48 UTC
List: ruby-talk #1976
On 17 Mar 2000, Dave Thomas wrote:

> Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> writes:
> 
> > >   class Foo
> > > 
> > >     attr_accessor :setting1, :setting2
> > > 
> > >     def initialize
> > >        @setting1 = 2
> > >        @setting2 = 5
> > >     end
> > >   end
> > 
> > Are these not accessing Instance variables, not class variables? I assume
> > from the @ and that there is talk of 1.5.x introducing @@variables, that
> > these are not true class variables, allowing instances of a class to share
> > a variable between them.
> 
> Yes, but as the class constant -> pseudo class variable hack is in the 
> FAQ, I assumed that he was after attribute setters.

	Ok, I was just beginning to get confused myself :-)
> 
> 
> Dave
> 
	Hugh
	hgs@dmu.ac.uk


In This Thread

Prev Next