diff options
Diffstat (limited to 'spec/bundler/support/permissions.rb')
-rw-r--r-- | spec/bundler/support/permissions.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/bundler/support/permissions.rb b/spec/bundler/support/permissions.rb new file mode 100644 index 0000000000..b21ce3848d --- /dev/null +++ b/spec/bundler/support/permissions.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +module Spec + module Permissions + def with_umask(new_umask) + old_umask = File.umask(new_umask) + yield if block_given? + ensure + File.umask(old_umask) + end + end +end |