diff options
author | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-08 20:25:44 +0000 |
---|---|---|
committer | a_matsuda <a_matsuda@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-11-08 20:25:44 +0000 |
commit | 39edad0380ce78a354cb7aa7d90579e395c6f432 (patch) | |
tree | 0484ee089e95647d2ddc953dd4ccf1e09463ddbb /lib | |
parent | d0a633990371d8704e789dfb4eb197413f9dfeda (diff) | |
download | ruby-39edad0380ce78a354cb7aa7d90579e395c6f432.tar.gz |
Fix undefined method 'dump' for nil:NilClass (NoMethodError)
Patch by: Dmitry Vorotilin <d.vorotilin@gmail.com> (@route)
Signed-off-by: Akira Matsuda <ronnie@dio.jp>
closes #1475
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/http/response.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index e2964c41a1..1351d7b2d2 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: |