diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-28 12:33:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-06-28 12:33:28 +0000 |
commit | d34b3c9a0fe8be5911e39b84590f9e7e5af24cdd (patch) | |
tree | f749a52111108feed24b5ba8cfa247b9ead4fdd4 /lib/fileutils.rb | |
parent | 8b251c6c2c32129c3bd8df23edf576ec7f4d2f85 (diff) | |
download | ruby-d34b3c9a0fe8be5911e39b84590f9e7e5af24cdd.tar.gz |
Octal mode
* lib/fileutils.rb (symbolic_modes_to_i): support octal mode
string. fix up r55513.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/fileutils.rb')
-rw-r--r-- | lib/fileutils.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/fileutils.rb b/lib/fileutils.rb index e9e9019a58..979741aa71 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -812,6 +812,7 @@ module FileUtils private_module_function :apply_mask def symbolic_modes_to_i(mode_sym, path) #:nodoc: + return mode_sym.oct if /\A[0-7]+\z/ =~ mode_sym mode = if File::Stat === path path.mode else |