diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-06-12 14:46:29 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-06-12 14:46:29 +0900 |
commit | 0bc91fa6df66782f1744eae7b92e460e8170eeff (patch) | |
tree | 0c1bd7f8223505d4c224d93346b6c8f6daa68f9a /spec/mspec/lib | |
parent | 39c9d99f6ccb81479c077e5cf1623572ade226a1 (diff) |
`File.umask` does not make sense on Windows
Diffstat (limited to 'spec/mspec/lib')
-rw-r--r-- | spec/mspec/lib/mspec/helpers/tmp.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/mspec/lib/mspec/helpers/tmp.rb b/spec/mspec/lib/mspec/helpers/tmp.rb index 437261a6d0..e903dd9f50 100644 --- a/spec/mspec/lib/mspec/helpers/tmp.rb +++ b/spec/mspec/lib/mspec/helpers/tmp.rb @@ -42,9 +42,11 @@ def tmp(name, uniquify = true) raise ArgumentError, "SPEC_TEMP_DIR (#{SPEC_TEMP_DIR}) is world writable but not sticky" end else - umask = File.umask - if (umask & 0002) == 0 # o+w - raise ArgumentError, "File.umask #=> #{umask.to_s(8)} (world-writable)" + platform_is_not :windows do + umask = File.umask + if (umask & 0002) == 0 # o+w + raise ArgumentError, "File.umask #=> #{umask.to_s(8)} (world-writable)" + end end mkdir_p SPEC_TEMP_DIR end |