[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Attempted roadmap of future instance variables....

dblack

12/2/2003 4:56:00 PM

1 Answer

ts

12/2/2003 5:07:00 PM

0

>>>>> "D" == David A Black <dblack@wobblini.net> writes:

D> I think that @_ and @ variables would behave identically when it came
D> to Class objects' instance variables

What do you expect ?

class A
@_m = 'A::_m'
@m = 'A::m'

def self.a
p @m, @_m
end
end

class B < A
@_m = 'B::_m'
@m = 'B::m'

def self.a
p @m, @_m
super
end
end

B.a



Guy Decoux