summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgor Homakov <homakov@gmail.com>2013-01-14 22:48:10 +0700
committerEgor Homakov <homakov@gmail.com>2013-01-14 22:48:10 +0700
commit32a9d084bf75a83e4862abd7f5ebd676a82f2b1c (patch)
treebb383bcf6ae96adb4ab3495b9fb750eea662e0dd
parentfb49673974c74d316806c76f0ede1bbf0ec1ec67 (diff)
downloadrack-32a9d084bf75a83e4862abd7f5ebd676a82f2b1c.tar.gz
Remove never called string
Previous check `p.empty?` makes sure that p contains at least 1 symbol. After `.split('=', 2)` k or v or both will turn into some string which means `k || v` will always return true and `next` will never be called.
-rw-r--r--lib/rack/utils.rb1
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb
index d0ab6b1a..7da2439e 100644
--- a/lib/rack/utils.rb
+++ b/lib/rack/utils.rb
@@ -70,7 +70,6 @@ module Rack
(qs || '').split(d ? /[#{d}] */n : DEFAULT_SEP).each do |p|
next if p.empty?
k, v = p.split('=', 2).map(&unescaper)
- next unless k || v
if cur = params[k]
if cur.class == Array