net-http 0.9.0 → 0.9.1

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/net/http.rb +6 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4b248ee1b72f192c00aeaa7667d98f0e1b7c8589ca0715e074c7134ecaf79b20
4
- data.tar.gz: e275a50ec3e743c3c32a89321a31589833c943a243a24196d4a9494e299badca
3
+ metadata.gz: ad9408074d86908c8284d26a13f9ba35d86948726c5e42ce453d40639be9d255
4
+ data.tar.gz: b23103da88f3b5cf36274fb39b07e6889c86fbe6e9abf4cb86ed6bc2c9ce9448
5
5
  SHA512:
6
- metadata.gz: d845907907e467c35bedf95eb9854fa15344f717a9a499495cdd403efdb71be40f33eaaeca01c3f949b491bd57abd03beaf1d8a75a4dd241509927596dd9d59b
7
- data.tar.gz: b28a46915ac4e105b83d7de85a13707b9ed938771d41dccf7bb16019a3718b141f15974d4d413f7664fdf64c0b033566ba6666755843efe43bee1a6dfa9a581a
6
+ metadata.gz: 5448ae667eff55826562b25f79a8f2e2991a79e1a763d1695429286b59e7e1ef25ffe2c22d9320dcf112daca3571112c7baae4a34c1b43caed6b0a944974c089
7
+ data.tar.gz: 7679a6cf608155d9dabb09a9ed969deddb315662d220087fb80ba2b4e6f9d8519c714c501048b5c55a48625bb013313435461813197c63f0de6aed4dbabd68dc
data/lib/net/http.rb CHANGED
@@ -724,7 +724,7 @@ module Net #:nodoc:
724
724
  class HTTP < Protocol
725
725
 
726
726
  # :stopdoc:
727
- VERSION = "0.9.0"
727
+ VERSION = "0.9.1"
728
728
  HTTPVersion = '1.1'
729
729
  begin
730
730
  require 'zlib'
@@ -1531,7 +1531,7 @@ module Net #:nodoc:
1531
1531
  :verify_depth,
1532
1532
  :verify_mode,
1533
1533
  :verify_hostname,
1534
- ] # :nodoc:
1534
+ ].freeze # :nodoc:
1535
1535
 
1536
1536
  SSL_IVNAMES = SSL_ATTRIBUTES.map { |a| "@#{a}".to_sym }.freeze # :nodoc:
1537
1537
 
@@ -1676,7 +1676,9 @@ module Net #:nodoc:
1676
1676
  begin
1677
1677
  s = timeouted_connect(conn_addr, conn_port)
1678
1678
  rescue => e
1679
- e = Net::OpenTimeout.new(e) if e.is_a?(Errno::ETIMEDOUT) # for compatibility with previous versions
1679
+ if (defined?(IO::TimeoutError) && e.is_a?(IO::TimeoutError)) || e.is_a?(Errno::ETIMEDOUT) # for compatibility with previous versions
1680
+ e = Net::OpenTimeout.new(e)
1681
+ end
1680
1682
  raise e, "Failed to open TCP connection to " +
1681
1683
  "#{conn_addr}:#{conn_port} (#{e.message})"
1682
1684
  end
@@ -2428,7 +2430,7 @@ module Net #:nodoc:
2428
2430
 
2429
2431
  # :stopdoc:
2430
2432
 
2431
- IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/ # :nodoc:
2433
+ IDEMPOTENT_METHODS_ = %w/GET HEAD PUT DELETE OPTIONS TRACE/.freeze # :nodoc:
2432
2434
 
2433
2435
  def transport_request(req)
2434
2436
  count = 0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - NARUSE, Yui