diff options
| author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-23 23:30:09 +0000 |
|---|---|---|
| committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-23 23:30:09 +0000 |
| commit | 3963da86f3ead5fc2d0a5ac704f64b8a01ada3e9 (patch) | |
| tree | 540a419418cd1eae49dbb26726142ef9994b7acc /lib/fileutils.rb | |
| parent | 84f9de47ded9052986c4e9483e6412570b8d1a3a (diff) | |
| download | ruby-3963da86f3ead5fc2d0a5ac704f64b8a01ada3e9.tar.gz ruby-3963da86f3ead5fc2d0a5ac704f64b8a01ada3e9.tar.xz ruby-3963da86f3ead5fc2d0a5ac704f64b8a01ada3e9.zip | |
* lib/fileutils.rb: fix visibility of FileUtils::NoWrite, Verbose, DryRun. [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: http://svn.ruby-lang.org/repos/ruby/trunk@9286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
| -rw-r--r-- | lib/fileutils.rb | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 36d5f70c0..a2c411f6e 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -1080,7 +1080,7 @@ module FileUtils def path if @path - @path + File.path(@path) else join(@prefix, @rel) end @@ -1486,6 +1486,9 @@ module FileUtils OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt.to_s) } end + METHODS = singleton_methods() - %w( private_module_function + commands options have_option? options_of collect_method ) + # # This module has all methods of FileUtils module, but it outputs messages # before acting. This equates to passing the <tt>:verbose</tt> flag to @@ -1500,9 +1503,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 # @@ -1519,9 +1528,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 # @@ -1539,9 +1554,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 |
