diff --git a/test/test_tar_output.rb b/test/test_tar_output.rb index 56c6c17..97df485 100644 --- a/test/test_tar_output.rb +++ b/test/test_tar_output.rb @@ -32,11 +32,11 @@ def test_open_no_block def test_file_looks_good Minitar::Output.open(@tarfile) do |os| NAMES.each do |name| - name = File.join("data__", name) - stat = File.stat(name) + filename = File.join("data__", name) + stat = File.stat(filename) opts = {size: stat.size, mode: 0o644} os.tar.add_file_simple(name, opts) do |ss| - File.open(name, "rb") { |ff| ss.write(ff.read(4096)) until ff.eof? } + File.open(filename, "rb") { |ff| ss.write(ff.read(4096)) until ff.eof? } end end end