Skip to content

Commit

Permalink
Get structs_spec.rb to pass on 1.8.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston committed Mar 14, 2012
1 parent 8ef5b0e commit 114e6bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/vcr/structs.rb
Expand Up @@ -395,7 +395,9 @@ def self.decompress(body, type)

case type
when 'gzip'
yield Zlib::GzipReader.new(StringIO.new(body), encoding: 'ASCII-8BIT').read
args = [StringIO.new(body)]
args << { :encoding => 'ASCII-8BIT' } if ''.respond_to?(:encoding)
yield Zlib::GzipReader.new(*args).read
when 'deflate'
yield Zlib::Inflate.inflate(body)
when 'identity', NilClass
Expand Down

0 comments on commit 114e6bc

Please sign in to comment.