From: Robert McGovern Date: 2002-12-04T20:02:53+09:00 Subject: Private Class Method Confusion I made a class which has simply class methods, the intention is that the class will not be instaniated. Inside it, one method was made private (using private_class_method) however when I try to call that private method from another class method I get a NoMethodError exception. I would have expected it to work as I am not attempting to call the method from outside the class. Anyone any thoughts? Output is: >ruby class_method_test.rb class_method_test.rb:5:in `store': private method `clear' called for Test:Class (NoMethodError) from class_method_test.rb:21 >Exit code: 1 Code: class Test @@value = nil def Test.store (x) Test.clear #line 5 value = x end def Test.get_value x end def Test.clear value = nil end private_class_method :clear end #test Test.store(1) #line 21 p Test.get_value Test.clear