* lib/fileutils.rb: method renaming: collect_methods -> collect_method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
aamine 2005-09-18 21:38:40 +00:00
Родитель b7083f661d
Коммит 8885a8720d
2 изменённых файлов: 10 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Mon Sep 19 06:38:03 2005 Minero Aoki <aamine@loveruby.net>
* lib/fileutils.rb: method renaming: collect_methods ->
collect_method.
Mon Sep 19 05:58:59 2005 Minero Aoki <aamine@loveruby.net>
* lib/fileutils.rb: use module_function instead of single extend.

Просмотреть файл

@ -1480,9 +1480,9 @@ module FileUtils
#
# Returns an Array of method names which have the option +opt+.
#
# p FileUtils.collect_methods(:preserve) #=> ["cp", "cp_r", "copy", "install"]
# p FileUtils.collect_method(:preserve) #=> ["cp", "cp_r", "copy", "install"]
#
def FileUtils.collect_methods(opt)
def FileUtils.collect_method(opt)
OPT_TABLE.keys.select {|m| OPT_TABLE[m].include?(opt.to_s) }
end
@ -1495,7 +1495,7 @@ module FileUtils
include FileUtils
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_methods('verbose').each do |name|
::FileUtils.collect_method('verbose').each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :verbose => true))
@ -1514,7 +1514,7 @@ module FileUtils
include FileUtils
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_methods('noop').each do |name|
::FileUtils.collect_method('noop').each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :noop => true))
@ -1534,7 +1534,7 @@ module FileUtils
include FileUtils
@fileutils_output = $stderr
@fileutils_label = ''
::FileUtils.collect_methods('noop').each do |name|
::FileUtils.collect_method('noop').each do |name|
module_eval(<<-EOS, __FILE__, __LINE__ + 1)
def #{name}(*args)
super(*fu_update_option(args, :noop => true, :verbose => true))