Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

remove extra loop, variable initialization

  • Loading branch information...
commit 7c83aca0818327472fa8c760d404e7c5e3d013e4 1 parent 232ed1e
@vipulnsward vipulnsward authored
Showing with 2 additions and 5 deletions.
  1. +0 −1  lib/rack/multipart/parser.rb
  2. +2 −4 lib/rack/utils.rb
View
1  lib/rack/multipart/parser.rb
@@ -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)
View
6 lib/rack/utils.rb
@@ -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.