pkgsrc/archivers/ruby-zip/patches/patch-ab
2010-10-06 12:27:24 +00:00

24 lines
625 B
Text

$NetBSD: patch-ab,v 1.1 2010/10/06 12:27:25 taca Exp $
* Fix for Ruby 1.9 from http://gist.github.com/611956.
--- lib/zip/zip.rb.orig 2010-10-06 01:16:09.000000000 +0000
+++ lib/zip/zip.rb
@@ -1080,7 +1080,7 @@ module Zip
def << (data)
val = data.to_s
@crc = Zlib::crc32(val, @crc)
- @size += val.size
+ @size += val.bytesize
@outputStream << val
end
@@ -1109,7 +1109,7 @@ module Zip
def << (data)
val = data.to_s
@crc = Zlib::crc32(val, @crc)
- @size += val.size
+ @size += val.bytesize
@outputStream << @zlibDeflater.deflate(data)
end