[前][次][番号順一覧][スレッド一覧]

ruby-changes:43450

From: nobu <ko1@a...>
Date: Tue, 28 Jun 2016 21:33:34 +0900 (JST)
Subject: [ruby-changes:43450] nobu:r55524 (trunk): Octal mode

nobu	2016-06-28 21:33:28 +0900 (Tue, 28 Jun 2016)

  New Revision: 55524

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55524

  Log:
    Octal mode
    
    * lib/fileutils.rb (symbolic_modes_to_i): support octal mode
      string.  fix up r55513.

  Modified files:
    trunk/lib/fileutils.rb
Index: lib/fileutils.rb
===================================================================
--- lib/fileutils.rb	(revision 55523)
+++ lib/fileutils.rb	(revision 55524)
@@ -812,6 +812,7 @@ module FileUtils https://github.com/ruby/ruby/blob/trunk/lib/fileutils.rb#L812
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]