Skip to content

reduce deprecated warning#279

Closed
takkanm wants to merge 1 commit into
nahi:masterfrom
takkanm:reduce_warning_timeout
Closed

reduce deprecated warning#279
takkanm wants to merge 1 commit into
nahi:masterfrom
takkanm:reduce_warning_timeout

Conversation

@takkanm
Copy link
Copy Markdown
Collaborator

@takkanm takkanm commented Nov 17, 2015

Object#timeout is deprecated in Ruby 2.3.

irb(main):001:0> RUBY_VERSION
=> "2.3.0"
irb(main):002:0> require 'httpclient'
=> true
irb(main):003:0> HTTPClient.get('http://google.com')
/Users/takkanm/.rbenv/versions/2.3.0-preview1/lib/ruby/gems/2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:734:in `connect': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/takkanm/.rbenv/versions/2.3.0-preview1/lib/ruby/gems/2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:500:in `query': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/takkanm/.rbenv/versions/2.3.0-preview1/lib/ruby/gems/2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:787:in `parse_header': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/takkanm/.rbenv/versions/2.3.0-preview1/lib/ruby/gems/2.3.0/gems/httpclient-2.7.0.1/lib/httpclient/session.rb:867:in `read_body_length': Object#timeout is deprecated, use Timeout.timeout instead.
=> #<HTTP::Message:0x007ff7a2afb968 @http_header=#<HTTP::Message::Headers:0x007ff7a2afb940 @http_version="1.1", @body_size=0, @chunked=false, @request_method="GET", @request_uri=#<URI::HTTP http://google.com>, @request_query=nil, @request_absolute_uri=nil, @status_code=302, @reason_phrase="Found", @body_type=nil, @body_charset=nil, @body_date=nil, @body_encoding=#<Encoding:UTF-8>, @is_request=false, @header_item=[["Cache-Control", "private"], ["Content-Type", "text/html; charset=UTF-8"], ["Location", "http://www.google.co.jp/?gfe_rd=cr&ei=fxNLVt6QJIyg8wedgoHABg"], ["Content-Length", "261"], ["Date", "Tue, 17 Nov 2015 11:46:07 GMT"], ["Server", "GFE/2.0"]], @dumped=false>, @peer_cert=nil, @http_body=#<HTTP::Message::Body:0x007ff7a2afb8c8 @body="<HTML><HEAD><meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">\n<TITLE>302 Moved</TITLE></HEAD><BODY>\n<H1>302 Moved</H1>\nThe document has moved\n<A HREF=\"http://www.google.co.jp/?gfe_rd=cr&amp;ei=fxNLVt6QJIyg8wedgoHABg\">here</A>.\r\n</BODY></HTML>\r\n", @size=0, @positions=nil, @chunk_size=nil>, @previous=nil>

Object#timeout is deprecated in Ruby 2.3.
@thisredone
Copy link
Copy Markdown

seriosusly 👍

@nahi
Copy link
Copy Markdown
Owner

nahi commented Dec 20, 2015

Sorry I kept you waiting. I merged #287 instead of this PR because it should be a right way. Thank you!

@nahi nahi closed this Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants