Skip to content

Commit

Permalink
fix: mime type string deprecation
Browse files Browse the repository at this point in the history
mime-types 3.6.0 warns "MIME::Type.MIME::Type.new when called with a String is deprecated."

change introduced in and syntax borrowed from:
mime-types/ruby-mime-types@8512c15
  • Loading branch information
avk committed Oct 2, 2024
1 parent 4724780 commit 1c2fc28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mechanize/pluggable_parsers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def parser content_type

return parser if parser

mime_type = MIME::Type.new content_type
mime_type = MIME::Type.new "content-type" => content_type

parser = @parsers[mime_type.to_s] ||
@parsers[mime_type.simplified] ||
Expand Down

0 comments on commit 1c2fc28

Please sign in to comment.