fileutils 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fileutils.rb +7 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a996246ac1d77406d404ad05edf85ad12709c5228c721e8410a723542740e4c
4
- data.tar.gz: 14ddbc3ce2d2bb2504e096c3a9826d9c5d6b3a116405b40dac6c1bd7e9870b3f
3
+ metadata.gz: f47c53c2d9a6fda99262d100845964c266befafafc71a99395ee58a9baa5bd3d
4
+ data.tar.gz: 5d4447b7fb7c5011846de8585bc475cd233f1c27d8edff2329c27e011b549d14
5
5
  SHA512:
6
- metadata.gz: d56948714f7d9fc5c8e98973bdd41489db7b4d107ee6060214e89a972062a23b8665cf8b0cbeb2ebcaf04140234111a4cc0ca672acdc766615868fcee3e64a20
7
- data.tar.gz: ac2e352e239eb2fca476b0d5bd7704ca29d2cc49dd46690f1222c5df255129a5860428cf7352d4dd64915c686973497886314bde305a655e1de5cb9dd25d4dbc
6
+ metadata.gz: 2ba476a1a25da609ab2caea6a4ccfe436556c4b7f3b90721716694f76eb0a24618301a6ee8c8cf47bed164516c3ee2a4b29b206b0bc45fafc6b3e207e016eb5b
7
+ data.tar.gz: 86136905e49ab909fdbd70d91b49165e5be9fb1ccbd9aee7a2ace1255abc6c0eec3314bf27844f30438dc8f85b64eb333538833dd348ab94e2ac79aeb58ea448
@@ -102,7 +102,7 @@ end
102
102
  # <tt>:verbose</tt> flags to methods in FileUtils.
103
103
  #
104
104
  module FileUtils
105
- VERSION = "1.4.0"
105
+ VERSION = "1.4.1"
106
106
 
107
107
  def self.private_module_function(name) #:nodoc:
108
108
  module_function name
@@ -917,8 +917,11 @@ module FileUtils
917
917
  private_module_function :apply_mask
918
918
 
919
919
  def symbolic_modes_to_i(mode_sym, path) #:nodoc:
920
- path = File.stat(path) unless File::Stat === path
921
- mode = path.mode
920
+ mode = if File::Stat === path
921
+ path.mode
922
+ else
923
+ File.stat(path).mode
924
+ end
922
925
  mode_sym.split(/,/).inject(mode & 07777) do |current_mode, clause|
923
926
  target, *actions = clause.split(/([=+-])/)
924
927
  raise ArgumentError, "invalid file mode: #{mode_sym}" if actions.empty?
@@ -935,7 +938,7 @@ module FileUtils
935
938
  when "x"
936
939
  mask | 0111
937
940
  when "X"
938
- if path.directory?
941
+ if FileTest.directory? path
939
942
  mask | 0111
940
943
  else
941
944
  mask
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fileutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minero Aoki