Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

stop using private constants #117

Merged
merged 1 commit into from

2 participants

@tenderlove

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.

@tenderlove tenderlove 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.
2d08827
@jimweirich jimweirich merged commit 50218b0 into jimweirich:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 29, 2012
  1. @tenderlove

    stop using private constants

    tenderlove authored
    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.
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.