From 923b1d453d1f4402e7ab10ef5c60de88a9bb2eed Mon Sep 17 00:00:00 2001 From: Thomas Sawyer Date: Tue, 17 Nov 2026 20:19:31 -0500 Subject: [PATCH] Release 4.2.0 Co-Authored-By: Claude Fable 5.2 --- HISTORY.md | 8 +++++++- README.md | 2 +- docs/atom.xml | 9 ++++++++- docs/index.html | 4 ++-- docs/learn.html | 2 +- docs/news.html | 3 ++- lib/core/facets/version.rb | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 74c142f3..6daa613c 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,12 @@ # Facets Release History -## Unreleased +## 4.2.0 / 2026-11-17 + +This release brings back four libraries that began in Facets and were +later kept as gems of their own: number bases (Radix), object +introspection (Instance, now `Mirror`), parametric mixins (Paramix) and +string masks (Strmask). The number bases load with `require 'facets'`; +the other three are loaded on request. Changes: diff --git a/README.md b/README.md index f31cac10..af223176 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **More of Ruby, one method at a time.** Facets is a collection of extensions to Ruby's core classes and standard library, plus a few small, reusable classes and modules. Most methods live in their own files, so you can load one extension, a class's extensions, or the core collection. -Facets took its name in 2004, growing out of a small methods library started in 2002, and is still maintained. The current release is **4.1.0**, which requires **Ruby 3.1 or newer**. See the [release history](HISTORY.md) for changes and migration notes from earlier versions. The `main` branch also contains changes awaiting the next release. +Facets took its name in 2004, growing out of a small methods library started in 2002, and is still maintained. The current release is **4.2.0**, which requires **Ruby 3.1 or newer**. See the [release history](HISTORY.md) for changes and migration notes from earlier versions. The `main` branch also contains changes awaiting the next release. ## Install diff --git a/docs/atom.xml b/docs/atom.xml index 4acb0466..b1701174 100644 --- a/docs/atom.xml +++ b/docs/atom.xml @@ -4,8 +4,15 @@ https://rubyworks.github.io/facets/ - 2026-11-08T00:00:00Z + 2026-11-17T00:00:00Z Ruby Facets + + Ruby Facets 4.2.0 + https://rubyworks.github.io/facets/news.html#facets-4-2-0 + + 2026-11-17T00:00:00Z + Adds number bases up to 62, and brings back Mirror, Paramix and String::Mask as opt-in libraries. + Ruby Facets 4.1.0 https://rubyworks.github.io/facets/news.html#facets-4-1-0 diff --git a/docs/index.html b/docs/index.html index 52dbf7f1..8d709d74 100644 --- a/docs/index.html +++ b/docs/index.html @@ -14,7 +14,7 @@

More of Ruby,
one method
at a time.

Get started Explore the source -

Version 4.1.0 Ruby 3.1+ BSD 2-Clause

+

Version 4.2.0 Ruby 3.1+ BSD 2-Clause

@@ -57,5 +57,5 @@

More of Ruby,
one method
at a time.

-

LATEST RELEASE

Fresh facets
for modern Ruby.

Version 4.1 makes the methods Facets shares with ActiveSupport work the same in both, so it no longer matters which one loads last, and stops Facets from changing what Ruby's own methods do. Version 4.0 made #try strict and #try! lenient, added a lib/rails area for Rails-compatible methods, and gave every deprecation a removal date.

Read the release notes
RUBY FACETS4.1.0NOVEMBER 2026
+

LATEST RELEASE

Fresh facets
for modern Ruby.

Version 4.2 adds conversion to any number base up to 62, and brings back Mirror, Paramix and String::Mask as libraries you load when you want them. Version 4.1 made the methods Facets shares with ActiveSupport work the same in both. Version 4.0 made #try strict and #try! lenient, added a lib/rails area for Rails-compatible methods, and gave every deprecation a removal date.

Read the release notes
RUBY FACETS4.1.0NOVEMBER 2026
diff --git a/docs/learn.html b/docs/learn.html index 2b839383..cfcb506f 100644 --- a/docs/learn.html +++ b/docs/learn.html @@ -5,7 +5,7 @@ ---

THE GUIDE

Find your way
into Facets.

Install the gem, choose how much to load, and make Ruby feel a little more like yours.

-

01 / GET READY

Install Facets

Facets 4.1.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.

TERMINAL
gem install facets
GEMFILE
gem 'facets', require: false

require: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.

To have Bundler load only certain extensions, for example in a Rails app, list their files instead:

GEMFILE
gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']
+

01 / GET READY

Install Facets

Facets 4.2.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.

TERMINAL
gem install facets
GEMFILE
gem 'facets', require: false

require: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.

To have Bundler load only certain extensions, for example in a Rails app, list their files instead:

GEMFILE
gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']

02 / CHOOSE YOUR SCOPE

Load what fits

Most core extension methods are stored in individual files. You can require one method, a class's core methods, or the core collection.

RUBY
# One method
 require 'facets/array/to_ranges'
 
diff --git a/docs/news.html b/docs/news.html
index 95e3a66a..0214d298 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -5,7 +5,8 @@
 ---
 

RELEASES & HISTORY

A living Ruby
collection.

Facets has been growing since 2004. Here are the recent releases and a path back through its story.

LATEST RELEASES

Facets 4

Facets 4 continues the modernization begun in 3.2 for Ruby 3.1 and newer. The 3.2.0 release changed enough that it should have been 4.0.0; 4.0.0 makes the next round of changes under the right number.

-
4.1.008 NOV 2026

LATEST

Out of Ruby's way

Makes the methods Facets shares with ActiveSupport behave as ActiveSupport's do, so it no longer matters which library loads last. Stops Facets from changing what Ruby's own methods do, including Hash#count and Array#shelljoin, and deprecates the block form of Kernel#extend.

Read changes
+
4.2.017 NOV 2026

LATEST

Old friends return

Adds Integer#to_base and String#from_base for any base from 2 to 62, and a :flush option for String#margin. Brings back three libraries that began in Facets, each loaded on request: Mirror for looking inside any object, Paramix for parametric mixins, and String::Mask. Fixes String#dashcase, Dir.multiglob, Array#delete_first and the salt Crypt3 generates.

Read changes
+
4.1.008 NOV 2026

Out of Ruby's way

Makes the methods Facets shares with ActiveSupport behave as ActiveSupport's do, so it no longer matters which library loads last. Stops Facets from changing what Ruby's own methods do, including Hash#count and Array#shelljoin, and deprecates the block form of Kernel#extend.

Read changes
4.0.102 NOV 2026

Safer shell escaping

Stops facets/shellwords from replacing Ruby's Shellwords.escape with a version that left shell metacharacters unescaped, lets Rails apps that load Facets boot again, and fixes several methods that broke on Ruby 3.

Read changes
4.0.027 SEP 2026

Clearer by design

Makes #try strict and #try! lenient, moves Rails-compatible methods to a new lib/rails area, and schedules every deprecation for removal after 2027-09-30.

Read changes
3.2.215 JUN 2026

Compatibility, polished

Fixes range intersection on Ruby 3.1 and 3.2, restores Range#overlap? where Ruby does not provide it, and corrects Binding#caller_locations argument handling.

Read changes
diff --git a/lib/core/facets/version.rb b/lib/core/facets/version.rb index db5689d1..c94ac56f 100644 --- a/lib/core/facets/version.rb +++ b/lib/core/facets/version.rb @@ -1,3 +1,3 @@ module Facets - VERSION = '4.1.0' + VERSION = '4.2.0' end