mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Add Rubocop for redundant returns
This commit is contained in:
parent
0256d71e60
commit
f418a6809a
8 changed files with 10 additions and 7 deletions
|
@ -76,3 +76,6 @@ Style/WhileUntilModifier:
|
|||
|
||||
Style/TernaryParentheses:
|
||||
Enabled: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
|
|
@ -309,7 +309,7 @@ module Puma
|
|||
|
||||
@body_remain = remain
|
||||
|
||||
return false
|
||||
false
|
||||
end
|
||||
|
||||
def read_body
|
||||
|
|
|
@ -91,7 +91,7 @@ module Puma
|
|||
path = ary.first[CALLER_FILE]
|
||||
|
||||
m = %r!puma/plugin/([^/]*)\.rb$!.match(path)
|
||||
return m[1]
|
||||
m[1]
|
||||
end
|
||||
|
||||
def self.create(&blk)
|
||||
|
|
|
@ -165,7 +165,7 @@ module Puma::Rack
|
|||
require config
|
||||
app = Object.const_get(::File.basename(config, '.rb').capitalize)
|
||||
end
|
||||
return app, options
|
||||
[app, options]
|
||||
end
|
||||
|
||||
def self.new_from_string(builder_script, file="(rackup)")
|
||||
|
|
|
@ -176,7 +176,7 @@ module Puma
|
|||
after_reply.each { |o| o.call }
|
||||
end
|
||||
|
||||
return res_info[:keep_alive]
|
||||
res_info[:keep_alive]
|
||||
end
|
||||
|
||||
# @param env [Hash] see Puma::Client#env, from request
|
||||
|
|
|
@ -396,7 +396,7 @@ module Puma
|
|||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
false
|
||||
end
|
||||
|
||||
# Given a connection on +client+, handle the incoming requests,
|
||||
|
|
|
@ -61,7 +61,7 @@ module Puma
|
|||
end
|
||||
end
|
||||
|
||||
return params
|
||||
params
|
||||
end
|
||||
|
||||
# A case-insensitive Hash that preserves the original case of a
|
||||
|
|
|
@ -137,7 +137,7 @@ class Http11ParserTest < Minitest::Test
|
|||
res << Digest::SHA1.digest(rand(count * 100).to_s) * (count / 20)
|
||||
end
|
||||
|
||||
return res
|
||||
res
|
||||
end
|
||||
|
||||
def test_max_uri_path_length
|
||||
|
|
Loading…
Reference in a new issue