summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkvokka <kvokka@yahoo.com>2020-11-04 00:15:42 +0000
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-11-04 14:51:56 +1300
commitcd5d902ac801f0bebeeb5d8dc534f717c9822b9b (patch)
treea3bd1b8bc24f70824298fa7c95f1315921f52baf
parent324f0355568064f131fc0cf0a4843a67b37858fc (diff)
downloadrack-cd5d902ac801f0bebeeb5d8dc534f717c9822b9b.tar.gz
Fix warning
Running specs against JRuby 9.2.13.0 got the warning: ``` /Users/mike/.asdf/installs/ruby/jruby-9.2.13.0/lib/ruby/gems/shared/gems/rack-2.2.3/lib/rack/media_type.rb:18: warning: `&' interpreted as argument prefix ``` This PR should fix it.
-rw-r--r--lib/rack/media_type.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rack/media_type.rb b/lib/rack/media_type.rb
index 41937c99..ff3145de 100644
--- a/lib/rack/media_type.rb
+++ b/lib/rack/media_type.rb
@@ -15,7 +15,7 @@ module Rack
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7
def type(content_type)
return nil unless content_type
- content_type.split(SPLIT_PATTERN, 2).first.tap &:downcase!
+ content_type.split(SPLIT_PATTERN, 2).first.tap(&:downcase!)
end
# The media type parameters provided in CONTENT_TYPE as a Hash, or