3.2.1 — Critical load fix
This is a critical fix release. If you are on 3.2.0, please upgrade.
3.2.0 shipped with stale require_relative lines pointing at method files that had been removed or renamed during the modernization, so require 'facets' raised LoadError and the gem could not be loaded at all. 3.2.1 restores loadability. Since 3.2.0 can't be loaded, 3.2.1 effectively supersedes it for anyone on ~> 3.2.
Bug Fixes
- Fix
LoadErroronrequire 'facets'. Removed the stalerequire_relativelines left pointing at removed method files (those methods are now provided natively by modern Ruby), and corrected thehash/to_proc→hash/setterrequire after that rename. All 17 broken references across the library were found and fixed. (#312, #315; thanks @lgatellier for #313, @nerdrew for #318) - Stop
Kernel::Asfrom redefiningobject_id, which printed a "redefining 'object_id' may cause serious problems" warning on every load. (#310, thanks @s2k) - Added a regression test (
test/core/load_paths_tc.rb) that statically verifies everyrequire_relativetarget resolves, so this class of breakage can't recur unnoticed.
New Modules
OpenDSL— build free-form, pluggable DSL modules from a block (require 'facets/opendsl').PIC— COBOL-style edited-picture pattern matching as a simple alternative to regular expressions (require 'facets/pic').
Upgrade Notes
- Requires Ruby 3.1+.
- If you used Facets' old
Hash#to_proc(which assigned a hash's key/value pairs as attributes on an object), it has moved toHash#setter— Facets no longer overridesHash#to_proc, since that conflicted with Ruby's own (key-lookup) version. Its option also changed fromresponse:tosafe:.
Note on versioning: the 3.2.x modernization carries breaking changes (removed/renamed methods, the Ruby 3.1+ requirement) that arguably warranted a major bump (#314). Rather than rewrite released history, that's being left for a proper 4.0.0; 3.2.1 exists to make the published 3.2 line installable again.
Full Changelog: 3.2.0...3.2.1