From: Julian Fondren Date: 2004-06-21T14:46:11+09:00 Subject: Re: About top-level method > In irb, I tested it like the following. > > def my_f > p "my_f" > end > > Object.my_f #=> print "my_f" > obj = Object.new > obj.my_f #=> print "my_f" Well, you tested it in irb. Consider: julian@tenacity test $ cat >> priv-test.rb def my_f p "my_f" end Object.my_f obj = Object.new obj.my_f julian@tenacity test $ ruby -w priv-test.rb priv-test.rb:5: private method `my_f' called for Object:Class (NoMethodError)