Issue #4 resolved

zipruby can't read its own output

Anonymous created an issue

{{{ [1] pry(main)> require 'zipruby' => true [2] pry(main)> Zip::Archive.open('foo.zip',Zip::CREATE) do |ar| ar.add_buffer("foo.txt", "FOO"); end => nil [3] pry(main)> Zip::Archive.open('foo.zip') do |ar| print ar.find{|z| z.name == "foo.txt"}.name; end RuntimeError: invalid Zip::File from (pry):3:in `name' }}}

{{{ $ unzip -l foo.zip Archive: foo.zip Length Date Time Name --------- ---------- ----- ---- 3 2012-03-16 14:43 foo.txt --------- ------- 3 1 file $ unzip -c foo.zip foo.txt Archive: foo.zip inflating: foo.txt
FOO }}}

Pry version 0.9.8.2 on Ruby 1.9.2

Comments (1)

  1. Log in to comment