diff options
author | Egor Homakov <homakov@gmail.com> | 2013-01-14 22:48:10 +0700 |
---|---|---|
committer | Egor Homakov <homakov@gmail.com> | 2013-01-14 22:48:10 +0700 |
commit | 32a9d084bf75a83e4862abd7f5ebd676a82f2b1c (patch) | |
tree | bb383bcf6ae96adb4ab3495b9fb750eea662e0dd | |
parent | fb49673974c74d316806c76f0ede1bbf0ec1ec67 (diff) | |
download | rack-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.rb | 1 |
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 |