From: Wes Gamble Date: 2006-04-29T02:43:18+09:00 Subject: Re: Intra-module method calls So, in normal language, does that mean that "private" is not meaningful within the context of a module? Thanks, Wes ts wrote: >>>>>> "W" == Wes Gamble writes: > > W> module ESimplyUtil > > [...] > > W> private > W> def ESimplyUtil.add_default_path(url) > > Be carefull, ruby will not do what you think > > moulon% cat b.rb > #!/usr/bin/ruby > module A > private > def self.a > end > > class << self > private > def b > end > end > end > > ["a", "b"].each do |m| > puts "#{m}() private ? #{A.private_methods.include?(m)}" > puts "#{m}() public ? #{A.public_methods.include?(m)}" > end > > moulon% > > moulon% ./b.rb > a() private ? false > a() public ? true > b() private ? true > b() public ? false > moulon% > > > Guy Decoux -- Posted via http://www.ruby-forum.com/.