@@ -230,7 +230,7 @@ def add_checksums(tar)
230230 end
231231 end
232232
233- tar . add_file_signed "checksums.yaml.gz" , 0444 , @signer do |io |
233+ tar . add_file_signed "checksums.yaml.gz" , 0o444 , @signer do |io |
234234 gzip_to io do |gz_io |
235235 Psych . dump checksums_by_algorithm , gz_io
236236 end
@@ -242,7 +242,7 @@ def add_checksums(tar)
242242 # and adds this file to the +tar+.
243243
244244 def add_contents ( tar ) # :nodoc:
245- digests = tar . add_file_signed "data.tar.gz" , 0444 , @signer do |io |
245+ digests = tar . add_file_signed "data.tar.gz" , 0o444 , @signer do |io |
246246 gzip_to io do |gz_io |
247247 Gem ::Package ::TarWriter . new gz_io do |data_tar |
248248 add_files data_tar
@@ -278,7 +278,7 @@ def add_files(tar) # :nodoc:
278278 # Adds the package's Gem::Specification to the +tar+ file
279279
280280 def add_metadata ( tar ) # :nodoc:
281- digests = tar . add_file_signed "metadata.gz" , 0444 , @signer do |io |
281+ digests = tar . add_file_signed "metadata.gz" , 0o444 , @signer do |io |
282282 gzip_to io do |gz_io |
283283 gz_io . write @spec . to_yaml
284284 end
@@ -382,7 +382,7 @@ def digest(entry) # :nodoc:
382382 def extract_files ( destination_dir , pattern = "*" )
383383 verify unless @spec
384384
385- FileUtils . mkdir_p destination_dir , :mode => dir_mode && 0755
385+ FileUtils . mkdir_p destination_dir , :mode => dir_mode && 0o755
386386
387387 @gem . with_read_io do |io |
388388 reader = Gem ::Package ::TarReader . new io
@@ -432,7 +432,7 @@ def extract_tar_gz(io, destination_dir, pattern = "*") # :nodoc:
432432 FileUtils . rm_rf destination
433433
434434 mkdir_options = { }
435- mkdir_options [ :mode ] = dir_mode ? 0755 : ( entry . header . mode if entry . directory? )
435+ mkdir_options [ :mode ] = dir_mode ? 0o755 : ( entry . header . mode if entry . directory? )
436436 mkdir =
437437 if entry . directory?
438438 destination
@@ -468,7 +468,7 @@ def extract_tar_gz(io, destination_dir, pattern = "*") # :nodoc:
468468 end
469469
470470 def file_mode ( mode ) # :nodoc:
471- ( ( mode & 0111 ) . zero? ? data_mode : prog_mode ) ||
471+ ( ( mode & 0o111 ) . zero? ? data_mode : prog_mode ) ||
472472 # If we're not using one of the default modes, then we're going to fall
473473 # back to the mode from the tarball. In this case we need to mask it down
474474 # to fit into 2^16 bits (the maximum value for a mode in CRuby since it
0 commit comments