1
0
Fork 0
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:
Nate Berkopec 2021-06-10 12:28:35 -06:00
parent 0256d71e60
commit f418a6809a
No known key found for this signature in database
GPG key ID: 19616755F4328D71
8 changed files with 10 additions and 7 deletions

View file

@ -76,3 +76,6 @@ Style/WhileUntilModifier:
Style/TernaryParentheses:
Enabled: true
Style/RedundantReturn:
Enabled: true

View file

@ -309,7 +309,7 @@ module Puma
@body_remain = remain
return false
false
end
def read_body

View file

@ -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)

View file

@ -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)")

View file

@ -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

View file

@ -396,7 +396,7 @@ module Puma
return true
end
return false
false
end
# Given a connection on +client+, handle the incoming requests,

View file

@ -61,7 +61,7 @@ module Puma
end
end
return params
params
end
# A case-insensitive Hash that preserves the original case of a

View file

@ -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