Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #537 from vipulnsward/remove_loop

remove extra loop, variable initialization
  • Loading branch information...
commit a2101458b8dad737aee7c80b4af23d45861649df 2 parents fb76001 + 7c83aca
Konstantin Haase rkh authored
Showing with 2 additions and 5 deletions.
  1. +0 −1  lib/rack/multipart/parser.rb
  2. +2 −4 lib/rack/utils.rb
1  lib/rack/multipart/parser.rb
View
@@ -87,7 +87,6 @@ def get_current_head_and_filename_and_content_type_and_name_and_body
head = nil
body = ''
filename = content_type = name = nil
- content = nil
until head && @buf =~ rx
if !head && i = @buf.index(EOL+EOL)
6 lib/rack/utils.rb
View
@@ -234,10 +234,8 @@ def select_best_encoding(available_encodings, accept_encoding)
encoding_candidates.push("identity")
end
- expanded_accept_encoding.find_all { |m, q|
- q == 0.0
- }.each { |m, _|
- encoding_candidates.delete(m)
+ expanded_accept_encoding.each { |m, q|
+ encoding_candidates.delete(m) if q == 0.0
}
return (encoding_candidates & available_encodings)[0]
Please sign in to comment.
Something went wrong with that request. Please try again.