Skip to content

Commit

Permalink
Require open-uri only on ruby 1.9, since it is not needed on 1.8.
Browse files Browse the repository at this point in the history
open-uri modifies the behavior of global open(), which is undesirable
in some situations. Do not require it unless it is going to be used.
  • Loading branch information
p committed Feb 11, 2012
1 parent 857e023 commit e16125d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/httpclient/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@


require 'time'
require 'open-uri' # for encoding
if defined?(Encoding::ASCII_8BIT)
require 'open-uri' # for encoding
end


# A namespace module for HTTP Message definitions used by HTTPClient.
Expand Down

0 comments on commit e16125d

Please sign in to comment.