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:
|
Style/TernaryParentheses:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
Style/RedundantReturn:
|
||||||
|
Enabled: true
|
||||||
|
|
|
@ -309,7 +309,7 @@ module Puma
|
||||||
|
|
||||||
@body_remain = remain
|
@body_remain = remain
|
||||||
|
|
||||||
return false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_body
|
def read_body
|
||||||
|
|
|
@ -91,7 +91,7 @@ module Puma
|
||||||
path = ary.first[CALLER_FILE]
|
path = ary.first[CALLER_FILE]
|
||||||
|
|
||||||
m = %r!puma/plugin/([^/]*)\.rb$!.match(path)
|
m = %r!puma/plugin/([^/]*)\.rb$!.match(path)
|
||||||
return m[1]
|
m[1]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.create(&blk)
|
def self.create(&blk)
|
||||||
|
|
|
@ -165,7 +165,7 @@ module Puma::Rack
|
||||||
require config
|
require config
|
||||||
app = Object.const_get(::File.basename(config, '.rb').capitalize)
|
app = Object.const_get(::File.basename(config, '.rb').capitalize)
|
||||||
end
|
end
|
||||||
return app, options
|
[app, options]
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.new_from_string(builder_script, file="(rackup)")
|
def self.new_from_string(builder_script, file="(rackup)")
|
||||||
|
|
|
@ -176,7 +176,7 @@ module Puma
|
||||||
after_reply.each { |o| o.call }
|
after_reply.each { |o| o.call }
|
||||||
end
|
end
|
||||||
|
|
||||||
return res_info[:keep_alive]
|
res_info[:keep_alive]
|
||||||
end
|
end
|
||||||
|
|
||||||
# @param env [Hash] see Puma::Client#env, from request
|
# @param env [Hash] see Puma::Client#env, from request
|
||||||
|
|
|
@ -396,7 +396,7 @@ module Puma
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
# Given a connection on +client+, handle the incoming requests,
|
# Given a connection on +client+, handle the incoming requests,
|
||||||
|
|
|
@ -61,7 +61,7 @@ module Puma
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return params
|
params
|
||||||
end
|
end
|
||||||
|
|
||||||
# A case-insensitive Hash that preserves the original case of a
|
# 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)
|
res << Digest::SHA1.digest(rand(count * 100).to_s) * (count / 20)
|
||||||
end
|
end
|
||||||
|
|
||||||
return res
|
res
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_max_uri_path_length
|
def test_max_uri_path_length
|
||||||
|
|
Loading…
Reference in a new issue