summaryrefslogtreecommitdiff
path: root/lib/net/http/response.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/http/response.rb')
-rw-r--r--lib/net/http/response.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb
index e2964c41a13..1351d7b2d26 100644
--- a/lib/net/http/response.rb
+++ b/lib/net/http/response.rb
@@ -117,7 +117,9 @@ class Net::HTTPResponse
end
def error! #:nodoc:
- raise error_type().new(@code + ' ' + @message.dump, self)
+ message = @code
+ message += ' ' + @message.dump if @message
+ raise error_type().new(message, self)
end
def error_type #:nodoc: