Skip to content

3.2.1 — Critical load fix

Choose a tag to compare

@trans trans released this 15 Jun 02:42
· 12 commits to main since this release

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 LoadError on require 'facets'. Removed the stale require_relative lines left pointing at removed method files (those methods are now provided natively by modern Ruby), and corrected the hash/to_prochash/setter require 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::As from redefining object_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 every require_relative target 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 to Hash#setter — Facets no longer overrides Hash#to_proc, since that conflicted with Ruby's own (key-lookup) version. Its option also changed from response: to safe:.

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