Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority extensions #162

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft
8 changes: 4 additions & 4 deletions .hoerc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
exclude: !ruby/regexp '/
\.(?:
tmp |
swp
tmp
| swp
)$
|
\.(?:
Expand All @@ -18,8 +18,7 @@ exclude: !ruby/regexp '/
[gG]emfile(?:\.lock)?
|
(?:
support |
research
support
)\/
|
\b(?i:TAGS)$
Expand All @@ -30,6 +29,7 @@ exclude: !ruby/regexp '/
fasterer |
pullreview |
rubocop* |
standard* |
travis |
unused
)\.yml$
Expand Down
29 changes: 28 additions & 1 deletion History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Changelog

## NEXT / YYYY-MM-DD

- 2 deprecations:

- Deprecated Array-based MIME::Type initialization.
- Deprecated String-based MIME::Type initialization.
- Deprecated `MIME::Type#priority_compare`. In a future release, this will be
will be renamed to `MIME::Type#<=>`. This method is used in tight loops, so
there is no warning message for either `MIME::Type#priority_compare` or
`MIME::Type#<=>`.

- 1 enhancement:

- Improved the performance of sorting by eliminating the complex comparison
flow from `MIME::Type#priority_compare`. The old version shows under 600
i/s, and the new version shows over 900 i/s. In sorting the full set of MIME
data, there are three differences between the old and new versions; after
comparison, these differences are considered acceptable.

- 1 bug fix:

- Simplified the default compare implementation (`MIME::Type#<=>`) to use the
new `MIME::Type#priority_compare` operation and simplify the fallback to
`String` comparison. This _may_ result in exceptions where there had been
none, as explicit support for several special values (which should have
caused errors in any case) have been removed.

## 3.5.2 / 2024-01-02

There are no primary code changes, but we are releasing this as an update as
Expand Down Expand Up @@ -105,7 +132,7 @@ there are some validation changes and updated code with formatting.

## 3.3 / 2019-09-04

- 1 minor enhancement
- 1 minor enhancement:

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