diamond-mechanize 2.3 → 2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/mechanize/http/agent.rb +2 -2
  2. metadata +1 -1
@@ -694,7 +694,7 @@ class Mechanize::HTTP::Agent
694
694
 
695
695
  begin
696
696
  zio = Zlib::GzipReader.new body_io
697
- out_io = Tempfile.new 'mechanize-decode'
697
+ out_io = Tempfile.new 'mechanize-decode', :encoding => 'ascii-8bit'
698
698
  out_io.binmode
699
699
 
700
700
  until zio.eof? do
@@ -798,7 +798,7 @@ class Mechanize::HTTP::Agent
798
798
  if StringIO === body_io and total > @max_file_buffer then
799
799
  new_io = Tempfile.new 'mechanize-raw'
800
800
  new_io.binmode if defined? binmode
801
-
801
+ new_io.set_encoding(body_io.external_encoding)
802
802
  new_io.write body_io.string
803
803
 
804
804
  body_io = new_io
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: diamond-mechanize
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "2.3"
5
+ version: "2.4"
6
6
  platform: ruby
7
7
  authors:
8
8
  - Eric Hodel