summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/net/http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 283263b3231..55794aeea94 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -590,7 +590,7 @@ module Net #:nodoc:
p_addr = :ENV if arg.size < 2
port = https_default_port if !port && opt && opt[:use_ssl]
http = new(address, port, p_addr, p_port, p_user, p_pass)
- http.ipaddr = opt[:ipaddr] if opt[:ipaddr]
+ http.ipaddr = opt[:ipaddr] if opt && opt[:ipaddr]
if opt
if opt[:use_ssl]