blob: 9e5aebc177e7a52c9d7ea7b1cf9842393566f99c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
$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
|