Skip to content

Commit 50218b0

Browse files
committed
Merge pull request ruby#117 from tenderlove/opttable
stop using private constants
2 parents bd3589c + 2d08827 commit 50218b0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/rake/file_utils_ext.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ class << self
2121
$fileutils_verbose = true
2222
$fileutils_nowrite = false
2323

24-
FileUtils::OPT_TABLE.each do |name, opts|
24+
FileUtils.commands.each do |name|
25+
opts = FileUtils.options_of name
2526
default_options = []
26-
if opts.include?(:verbose) || opts.include?("verbose")
27+
if opts.include?("verbose")
2728
default_options << ':verbose => FileUtilsExt.verbose_flag'
2829
end
29-
if opts.include?(:noop) || opts.include?("noop")
30+
if opts.include?("noop")
3031
default_options << ':noop => FileUtilsExt.nowrite_flag'
3132
end
3233

0 commit comments

Comments
 (0)