Skip to content

Commit

Permalink
Do not require stringio
Browse files Browse the repository at this point in the history
It is not used in net/http library code since commit 15ccd01
(r36473 in ruby svn trunk, 2012).

require's in test suite are also cleaned up.
  • Loading branch information
rhenium committed Apr 29, 2021
1 parent 4f2c419 commit 996d18a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion lib/net/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ class HTTP < Protocol
HTTPVersion = '1.1'
begin
require 'zlib'
require 'stringio' #for our purposes (unpacking gzip) lump these together
HAVE_ZLIB=true
rescue LoadError
HAVE_ZLIB=false
Expand Down
1 change: 0 additions & 1 deletion test/net/http/test_http_request.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: false
require 'net/http'
require 'test/unit'
require 'stringio'

class HTTPRequestTest < Test::Unit::TestCase

Expand Down
4 changes: 1 addition & 3 deletions test/net/http/test_https.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# frozen_string_literal: false
require "test/unit"
require_relative "utils"
begin
require 'net/https'
require 'stringio'
require 'timeout'
require File.expand_path("utils", File.dirname(__FILE__))
rescue LoadError
# should skip this test
end
Expand Down

0 comments on commit 996d18a

Please sign in to comment.