From 6e77ae4c1341f38aea103d7072c31ecd61c432ba Mon Sep 17 00:00:00 2001 From: aamine Date: Fri, 23 Sep 2005 23:39:01 +0000 Subject: * lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun (backported from trunk, rev 1.66). [ruby-core:05954] * test/fileutils/test_nowrite.rb: test it. * test/fileutils/test_dryrun.rb: new file. * test/fileutils/test_verbose.rb: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/fileutils.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'lib/fileutils.rb') diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 8bfaf8bd10..320c49ce93 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1443,6 +1443,8 @@ module FileUtils end private_module_function :fu_output_message + METHODS = singleton_methods() - ['private_module_function'] + # # Returns an Array of method names which have any options. # @@ -1505,9 +1507,15 @@ module FileUtils def #{name}(*args) super(*fu_update_option(args, :verbose => true)) end + private :#{name} EOS end extend self + class << self + ::FileUtils::METHODS.each do |m| + public m + end + end end # @@ -1524,9 +1532,15 @@ module FileUtils def #{name}(*args) super(*fu_update_option(args, :noop => true)) end + private :#{name} EOS end extend self + class << self + ::FileUtils::METHODS.each do |m| + public m + end + end end # @@ -1544,9 +1558,15 @@ module FileUtils def #{name}(*args) super(*fu_update_option(args, :noop => true, :verbose => true)) end + private :#{name} EOS end extend self + class << self + ::FileUtils::METHODS.each do |m| + public m + end + end end end -- cgit v1.2.3