From: Ryan Davis Date: 2010-04-21T16:20:53+09:00 Subject: Re: Module "re-opening" On Apr 20, 2010, at 22:55 , tilde wrote: > Hi there, first time arond here for me, and first step with ruby ^^ > > well, i come with a simple (maybe stupid) question: > > http://sprunge.us/BjJP?rb > > why this simple source doesn't do what is expected? (modify the visibility of sqrt module) > > thx in advance for any answer ^^ It is essentially a class method, so you need to invoke private at the class level: >> module Math; class << self; private :sqrt; end; end >> Math.sqrt 42 NoMethodError: private method `sqrt' called for Math:Module