diff options
Diffstat (limited to 'lib/rubygems/package/tar_test_case.rb')
-rw-r--r-- | lib/rubygems/package/tar_test_case.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/package/tar_test_case.rb b/lib/rubygems/package/tar_test_case.rb index 5253e32f36..4601f1328f 100644 --- a/lib/rubygems/package/tar_test_case.rb +++ b/lib/rubygems/package/tar_test_case.rb @@ -71,7 +71,7 @@ class Gem::Package::TarTestCase < Gem::TestCase SP(Z(to_oct(sum, 6))) end - def header(type, fname, dname, length, mode, mtime, checksum = nil) + def header(type, fname, dname, length, mode, checksum = nil) checksum ||= " " * 8 arr = [ # struct tarfile_entry_posix @@ -80,7 +80,7 @@ class Gem::Package::TarTestCase < Gem::TestCase Z(to_oct(0, 7)), # char uid[8]; ditto Z(to_oct(0, 7)), # char gid[8]; ditto Z(to_oct(length, 11)), # char size[12]; 0 padded, octal, null - Z(to_oct(mtime, 11)), # char mtime[12]; 0 padded, octal, null + Z(to_oct(0, 11)), # char mtime[12]; 0 padded, octal, null checksum, # char checksum[8]; 0 padded, octal, null, space type, # char typeflag[1]; file: "0" dir: "5" "\0" * 100, # char linkname[100]; ASCII + (Z unless filled) @@ -105,16 +105,16 @@ class Gem::Package::TarTestCase < Gem::TestCase ret end - def tar_dir_header(name, prefix, mode, mtime) - h = header("5", name, prefix, 0, mode, mtime) + def tar_dir_header(name, prefix, mode) + h = header("5", name, prefix, 0, mode) checksum = calc_checksum(h) - header("5", name, prefix, 0, mode, mtime, checksum) + header("5", name, prefix, 0, mode, checksum) end - def tar_file_header(fname, dname, mode, length, mtime) - h = header("0", fname, dname, length, mode, mtime) + def tar_file_header(fname, dname, mode, length) + h = header("0", fname, dname, length, mode) checksum = calc_checksum(h) - header("0", fname, dname, length, mode, mtime, checksum) + header("0", fname, dname, length, mode, checksum) end def to_oct(n, pad_size) @@ -130,7 +130,7 @@ class Gem::Package::TarTestCase < Gem::TestCase end def util_dir_entry - util_entry tar_dir_header("foo", "bar", 0, Time.now) + util_entry tar_dir_header("foo", "bar", 0) end end |