Skip to content

Commit fb782d3

Browse files
committed
Deprecate MIME::Types.new(Array)
1 parent ac2e0d4 commit fb782d3

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

CHANGELOG.md

+26-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## NEXT / YYYY-MM-DD
4+
5+
- 1 deprecation:
6+
7+
- Deprecated `MIME::Type#priority_compare`. In a future release, this will be
8+
will be renamed to `MIME::Type#<=>`. This method is used in tight loops, so
9+
there is no warning message for either `MIME::Type#priority_compare` or
10+
`MIME::Type#<=>`.
11+
12+
- 1 enhancement:
13+
14+
- Improved the performance of sorting by eliminating the complex comparison
15+
flow from `MIME::Type#priority_compare`. The old version shows under 600
16+
i/s, and the new version shows over 900 i/s. In sorting the full set of MIME
17+
data, there are three differences between the old and new versions; after
18+
comparison, these differences are considered acceptable.
19+
20+
- 1 bug fix:
21+
22+
- Simplified the default compare implementation (`MIME::Type#<=>`) to use the
23+
new `MIME::Type#priority_compare` operation and simplify the fallback to
24+
`String` comparison. This _may_ result in exceptions where there had been
25+
none, as explicit support for several special values (which should have
26+
caused errors in any case) have been removed.
27+
328
## 3.6.2 / 2025-03-25
429

530
- Updated the reference to the changelog in the README, fixing RubyGems metadata
@@ -151,7 +176,7 @@ there are some validation changes and updated code with formatting.
151176

152177
## 3.3 / 2019-09-04
153178

154-
- 1 minor enhancement
179+
- 1 minor enhancement:
155180

156181
- Jean Boussier reduced memory usage for Ruby versions 2.3 or higher by
157182
interning various string values in each type. This is done with a

0 commit comments

Comments
 (0)