开发者

What zip library works well with Ruby 1.9.2?

开发者 https://www.devze.com 2023-03-03 15:08 出处:网络
I used the rubyzip gem in Ruby 1.8.7 before, but I heard rubyzip doesn\'t work well with ruby 1.9.2. Wha开发者_StackOverflow中文版t zip libraries work well with Ruby 1.9.2?Have you actually tried usi

I used the rubyzip gem in Ruby 1.8.7 before, but I heard rubyzip doesn't work well with ruby 1.9.2.

Wha开发者_StackOverflow中文版t zip libraries work well with Ruby 1.9.2?


Have you actually tried using rubyzip with 1.9.2? Seems to work fine for me:

>> RUBY_VERSION 
#=> "1.9.2"
>> require 'zip/zip' 
#=> true
>> Zip::ZipFile.foreach(File.expand_path("~/Downloads/Archive.zip")) { |f| p f } 
#=> [bartxt, footxt]
bar.txt
foo.txt


I used rubyzip gem in Ruby 1.8.7 also. For Ruby 1.9.x you need to use version 0.9.5 or higher. Works without any problems.


I found zip it says it's compatible with 1.9.1 I don't think it would have any issues in 1.9.2

0

精彩评论

暂无评论...
验证码 换一张
取 消