Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

stop using private constants

FileUtils::OPT_TABLE is declared as :nodoc: and commented as "internal
use only", so use the FileUtils accessors rather than directly referring
to the constant.
  • Loading branch information...
commit 2d088279406c6ffcd2c129967ac1bd329a904c31 1 parent 8620a35
@tenderlove authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/rake/file_utils_ext.rb
View
7 lib/rake/file_utils_ext.rb
@@ -21,12 +21,13 @@ class << self
$fileutils_verbose = true
$fileutils_nowrite = false
- FileUtils::OPT_TABLE.each do |name, opts|
+ FileUtils.commands.each do |name|
+ opts = FileUtils.options_of name
default_options = []
- if opts.include?(:verbose) || opts.include?("verbose")
+ if opts.include?("verbose")
default_options << ':verbose => FileUtilsExt.verbose_flag'
end
- if opts.include?(:noop) || opts.include?("noop")
+ if opts.include?("noop")
default_options << ':noop => FileUtilsExt.nowrite_flag'
end
Please sign in to comment.
Something went wrong with that request. Please try again.