Skip to content

Commit

Permalink
Fix return value of Zlib::GzipWriter#<< and #write
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh committed Mar 22, 2012
1 parent 1eed9a0 commit 4ece77a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/zlib.rb.ffi
Original file line number Diff line number Diff line change
Expand Up @@ -1349,12 +1349,17 @@ module Zlib
end

write_raw

data.length
end

##
# Same as IO.

alias << write
def <<(data)
write(data)
self
end

def write_raw
data = @zstream.detatch_output
Expand Down

0 comments on commit 4ece77a

Please sign in to comment.