Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kvokka authored and ioquatix committed Nov 4, 2020
1 parent 324f035 commit cd5d902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rack/media_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class << self
# 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
Expand Down

0 comments on commit cd5d902

Please sign in to comment.