From: Brian Candler Date: 2003-02-22T21:38:17+09:00 Subject: Re: Style question: using 'block_given?' Here's another one while we're on the subject of "consistent and predictable" :-) class Tree @count = 0 @@count = 50 def Tree.inc @count += 1 end def Tree.inc2 @@count += 1 end end def Tree.dec @count -= 1 end def Tree.dec2 @@count -= 1 end puts Tree.inc #>> 1 puts Tree.inc2 #>> 51 puts Tree.dec #>> 0 puts Tree.dec2 #>> uninitialized class variable @@count in Object (NameError) (but in this case it's class variables, not class instance variables, which appear to be behaving inconsistently) Regards, Brian.