diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-26 08:30:20 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-26 08:30:20 +0000 |
commit | fe72157f8edd049097b28f6b81bc74100ecdb791 (patch) | |
tree | 3789f84a097d8bf3f65dcccb0221e6bd33e69a4f | |
parent | 6845b995299acdeaf93fc50aa84d6ca390d3ba8a (diff) | |
download | ruby-fe72157f8edd049097b28f6b81bc74100ecdb791.tar.gz |
* lib/fileutils.rb: rename tailing to trailing.
[Misc #11548]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/fileutils.rb | 10 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,8 @@ +Mon Oct 26 17:30:13 2015 Ryan Hosford <tad.hosford@gmail.com> + + * lib/fileutils.rb: rename tailing to trailing. + [Misc #11548] + Mon Oct 26 17:11:53 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * parse.y (call_op, call_op2): fix values on ripper. [Feature #11537] diff --git a/lib/fileutils.rb b/lib/fileutils.rb index 9aa4036338..1468d66361 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -156,10 +156,10 @@ module FileUtils end module_function :uptodate? - def remove_tailing_slash(dir) + def remove_trailing_slash(dir) dir == '/' ? dir : dir.chomp(?/) end - private_module_function :remove_tailing_slash + private_module_function :remove_trailing_slash # # Options: mode noop verbose @@ -207,7 +207,7 @@ module FileUtils fu_output_message "mkdir -p #{options[:mode] ? ('-m %03o ' % options[:mode]) : ''}#{list.join ' '}" if options[:verbose] return *list if options[:noop] - list.map {|path| remove_tailing_slash(path)}.each do |path| + list.map {|path| remove_trailing_slash(path)}.each do |path| # optimize for the most common case begin fu_mkdir path, options[:mode] @@ -244,7 +244,7 @@ module FileUtils OPT_TABLE['makedirs'] = [:mode, :noop, :verbose] def fu_mkdir(path, mode) #:nodoc: - path = remove_tailing_slash(path) + path = remove_trailing_slash(path) if mode Dir.mkdir path, mode File.chmod mode, path @@ -272,7 +272,7 @@ module FileUtils return if options[:noop] list.each do |dir| begin - Dir.rmdir(dir = remove_tailing_slash(dir)) + Dir.rmdir(dir = remove_trailing_slash(dir)) if parents until (parent = File.dirname(dir)) == '.' or parent == dir dir = parent |