The Wire · Showcase
RAILS TIGHTENS MIME TYPE API, PUSHES RACTOR SAFETY FORWARD
By RepoJournal · Filed · About Rails
Rails is deprecating three internal MIME constants that leak mutable state, forcing a clean migration to the public API while the framework quietly hardens itself for concurrent Ractor execution.
The framework shipped deprecations for Mime::SET, Mime::LOOKUP, and Mime::EXTENSION_LOOKUP [1], constants that expose internal registries directly and create attack surface for accidental mutation. The good news: everything these constants do is already available through Mime.symbols, Mime.extensions, and Mime::Type.lookup methods, so the migration path is straightforward [1]. Meanwhile, Rails is making systematic progress on Ractor safety across two fronts. AttributeMethods now freezes its internal aliases and patterns by default, and InheritableOptions ditches the shareable-unsafe default proc that was blocking Ractor compatibility [2] [3]. These aren't flashy changes, but they're the infrastructure work that makes Ractor-safe Rails applications possible without constantly fighting the framework.
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
References
- [1] Deprecate Mime::SET, Mime::LOOKUP and Mime::EXTENSION_LOOKUP ↗ rails/rails
- [2] Attribute methods ractor safe ↗ rails/rails
- [3] Make InheritableOptions ractor safe ↗ rails/rails