aboutsummaryrefslogtreecommitdiffstats
path: root/lib/fileutils.rb
diff options
context:
space:
mode:
authoraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-23 23:30:09 +0000
committeraamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-23 23:30:09 +0000
commita33aa9c9f4f9d692f184415aebbb60dc4e75a902 (patch)
tree540a419418cd1eae49dbb26726142ef9994b7acc /lib/fileutils.rb
parent4a092d08f48f65f7114daca133cbb92bc7ff4057 (diff)
downloadruby-a33aa9c9f4f9d692f184415aebbb60dc4e75a902.tar.gz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@9286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r--lib/fileutils.rb23
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 36d5f70c0d..a2c411f6e3 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