Skip to content

Commit

Permalink
RuboCop fixups
Browse files Browse the repository at this point in the history
Also locks to the latest version of RuboCop so these sorts of random RuboCop
changes don't wind up in the middle of other PRs.
  • Loading branch information
tarcieri committed Nov 21, 2015
1 parent b4b9c1d commit 24ca716
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ end
group :test do
gem "backports"
gem "coveralls"
gem "simplecov", ">= 0.9"
gem "json", ">= 1.8.1"
gem "rspec", "~> 3.0"
gem "simplecov", ">= 0.9"
gem "json", ">= 1.8.1"
gem "rubocop", "= 0.35.1"
gem "rspec", "~> 3.0"
gem "rspec-its"
gem "rubocop"
gem "yardstick"
gem "certificate_authority"
end
Expand Down
5 changes: 4 additions & 1 deletion lib/http/chainable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ def request(verb, uri, options = {})
# @option options [Float] :write Write timeout
# @option options [Float] :connect Connect timeout
def timeout(klass, options = {})
klass, options = :per_operation, klass if klass.is_a? Hash
if klass.is_a? Hash
options = klass
klass = :per_operation
end

klass = case klass.to_sym
when :null then HTTP::Timeout::Null
Expand Down
3 changes: 2 additions & 1 deletion lib/http/response/parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def on_body(chunk)
end

def chunk
chunk, @chunk = @chunk, nil
chunk = @chunk
@chunk = nil
chunk
end

Expand Down

0 comments on commit 24ca716

Please sign in to comment.