Skip to content

Commit 81ae5fe

Browse files
authored
Merge pull request #348 from rubyworks/release/4.2.0
Release 4.2.0.
2 parents ef5cd55 + 923b1d4 commit 81ae5fe

7 files changed

Lines changed: 22 additions & 8 deletions

File tree

‎HISTORY.md‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Facets Release History
22

3-
## Unreleased
3+
## 4.2.0 / 2026-11-17
4+
5+
This release brings back four libraries that began in Facets and were
6+
later kept as gems of their own: number bases (Radix), object
7+
introspection (Instance, now `Mirror`), parametric mixins (Paramix) and
8+
string masks (Strmask). The number bases load with `require 'facets'`;
9+
the other three are loaded on request.
410

511
Changes:
612

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
**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.
77

8-
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.
8+
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.
99

1010
## Install
1111

‎docs/atom.xml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
<id>https://rubyworks.github.io/facets/</id>
55
<link href="https://rubyworks.github.io/facets/"/>
66
<link href="https://rubyworks.github.io/facets/atom.xml" rel="self" type="application/atom+xml"/>
7-
<updated>2026-11-08T00:00:00Z</updated>
7+
<updated>2026-11-17T00:00:00Z</updated>
88
<author><name>Ruby Facets</name></author>
9+
<entry>
10+
<title>Ruby Facets 4.2.0</title>
11+
<id>https://rubyworks.github.io/facets/news.html#facets-4-2-0</id>
12+
<link href="https://rubyworks.github.io/facets/news.html#facets-4-2-0"/>
13+
<updated>2026-11-17T00:00:00Z</updated>
14+
<summary>Adds number bases up to 62, and brings back Mirror, Paramix and String::Mask as opt-in libraries.</summary>
15+
</entry>
916
<entry>
1017
<title>Ruby Facets 4.1.0</title>
1118
<id>https://rubyworks.github.io/facets/news.html#facets-4-1-0</id>

‎docs/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h1>More of Ruby,<br><em>one method</em><br>at a time.</h1>
1414
<a class="button button-primary" href="learn.html">Get started <span aria-hidden="true">↗</span></a>
1515
<a class="button button-outline" href="https://github.com/rubyworks/facets">Explore the source <span aria-hidden="true">↗</span></a>
1616
</div>
17-
<p class="hero-note">Version <strong>4.1.0</strong> <span aria-hidden="true">·</span> Ruby <strong>3.1+</strong> <span aria-hidden="true">·</span> BSD 2-Clause</p>
17+
<p class="hero-note">Version <strong>4.2.0</strong> <span aria-hidden="true">·</span> Ruby <strong>3.1+</strong> <span aria-hidden="true">·</span> BSD 2-Clause</p>
1818
</div>
1919
<div class="hero-visual" aria-label="Ruby Facets code example">
2020
<div class="orbit orbit-one"></div><div class="orbit orbit-two"></div>
@@ -57,5 +57,5 @@ <h1>More of Ruby,<br><em>one method</em><br>at a time.</h1>
5757
</section>
5858

5959
<section class="section release-section">
60-
<div class="shell release-grid"><div><p class="kicker kicker-light">LATEST RELEASE</p><h2>Fresh facets<br>for modern Ruby.</h2><p>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 <code>#try</code> strict and <code>#try!</code> lenient, added a <code>lib/rails</code> area for Rails-compatible methods, and gave every deprecation a removal date.</p><a class="button button-light" href="news.html">Read the release notes <span aria-hidden="true">↗</span></a></div><div class="release-stamp"><span class="release-stamp-small">RUBY FACETS</span><strong>4.1.0</strong><span>NOVEMBER 2026</span></div></div>
60+
<div class="shell release-grid"><div><p class="kicker kicker-light">LATEST RELEASE</p><h2>Fresh facets<br>for modern Ruby.</h2><p>Version 4.2 adds conversion to any number base up to 62, and brings back <code>Mirror</code>, <code>Paramix</code> and <code>String::Mask</code> 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 <code>#try</code> strict and <code>#try!</code> lenient, added a <code>lib/rails</code> area for Rails-compatible methods, and gave every deprecation a removal date.</p><a class="button button-light" href="news.html">Read the release notes <span aria-hidden="true">↗</span></a></div><div class="release-stamp"><span class="release-stamp-small">RUBY FACETS</span><strong>4.1.0</strong><span>NOVEMBER 2026</span></div></div>
6161
</section>

‎docs/learn.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
---
66
<section class="page-hero"><div class="shell"><p class="eyebrow"><span class="eyebrow-line"></span> THE GUIDE</p><h1>Find your way<br><em>into Facets.</em></h1><p>Install the gem, choose how much to load, and make Ruby feel a little more like yours.</p></div></section>
77
<section class="section section-light"><div class="shell guide-grid"><aside class="guide-aside"><p class="kicker">ON THIS PAGE</p><a href="#install">Install</a><a href="#load">Load extensions</a><a href="#examples">Try a few methods</a><a href="#reference">Find the API</a></aside><div class="guide-content">
8-
<section id="install" class="guide-block"><p class="kicker">01 / GET READY</p><h2>Install Facets</h2><p>Facets 4.1.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.</p><div class="snippet"><div class="snippet-label">TERMINAL</div><pre><code>gem install facets</code></pre></div><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: false</code></pre></div><p><code>require: false</code> keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.</p><p>To have Bundler load only certain extensions, for example in a Rails app, list their files instead:</p><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']</code></pre></div></section>
8+
<section id="install" class="guide-block"><p class="kicker">01 / GET READY</p><h2>Install Facets</h2><p>Facets 4.2.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.</p><div class="snippet"><div class="snippet-label">TERMINAL</div><pre><code>gem install facets</code></pre></div><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: false</code></pre></div><p><code>require: false</code> keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.</p><p>To have Bundler load only certain extensions, for example in a Rails app, list their files instead:</p><div class="snippet"><div class="snippet-label">GEMFILE</div><pre><code>gem 'facets', require: ['facets/array/to_ranges', 'facets/string/snakecase']</code></pre></div></section>
99
<section id="load" class="guide-block"><p class="kicker">02 / CHOOSE YOUR SCOPE</p><h2>Load what fits</h2><p>Most core extension methods are stored in individual files. You can require one method, a class's core methods, or the core collection.</p><div class="snippet"><div class="snippet-label">RUBY</div><pre><code><span class="code-comment"># One method</span>
1010
require 'facets/array/to_ranges'
1111

‎docs/news.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
---
66
<section class="page-hero"><div class="shell"><p class="eyebrow"><span class="eyebrow-line"></span> RELEASES & HISTORY</p><h1>A living Ruby<br><em>collection.</em></h1><p>Facets has been growing since 2004. Here are the recent releases and a path back through its story.</p></div></section>
77
<section class="section section-light"><div class="shell"><div class="section-heading narrow"><p class="kicker">LATEST RELEASES</p><h2>Facets 4</h2><p>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.</p></div><div class="timeline">
8-
<article class="timeline-item" id="facets-4-1-0"><div class="timeline-date"><strong>4.1.0</strong><span>08 NOV 2026</span></div><div><p class="tag">LATEST</p><h3>Out of Ruby's way</h3><p>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 <code>Hash#count</code> and <code>Array#shelljoin</code>, and deprecates the block form of <code>Kernel#extend</code>.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#410--2026-11-08">Read changes <span aria-hidden="true">↗</span></a></div></article>
8+
<article class="timeline-item" id="facets-4-2-0"><div class="timeline-date"><strong>4.2.0</strong><span>17 NOV 2026</span></div><div><p class="tag">LATEST</p><h3>Old friends return</h3><p>Adds <code>Integer#to_base</code> and <code>String#from_base</code> for any base from 2 to 62, and a <code>:flush</code> option for <code>String#margin</code>. Brings back three libraries that began in Facets, each loaded on request: <code>Mirror</code> for looking inside any object, <code>Paramix</code> for parametric mixins, and <code>String::Mask</code>. Fixes <code>String#dashcase</code>, <code>Dir.multiglob</code>, <code>Array#delete_first</code> and the salt <code>Crypt3</code> generates.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#420--2026-11-17">Read changes <span aria-hidden="true">↗</span></a></div></article>
9+
<article class="timeline-item" id="facets-4-1-0"><div class="timeline-date"><strong>4.1.0</strong><span>08 NOV 2026</span></div><div><h3>Out of Ruby's way</h3><p>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 <code>Hash#count</code> and <code>Array#shelljoin</code>, and deprecates the block form of <code>Kernel#extend</code>.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#410--2026-11-08">Read changes <span aria-hidden="true">↗</span></a></div></article>
910
<article class="timeline-item" id="facets-4-0-1"><div class="timeline-date"><strong>4.0.1</strong><span>02 NOV 2026</span></div><div><h3>Safer shell escaping</h3><p>Stops <code>facets/shellwords</code> from replacing Ruby's <code>Shellwords.escape</code> 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.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#401--2026-11-02">Read changes <span aria-hidden="true">↗</span></a></div></article>
1011
<article class="timeline-item" id="facets-4-0-0"><div class="timeline-date"><strong>4.0.0</strong><span>27 SEP 2026</span></div><div><h3>Clearer by design</h3><p>Makes <code>#try</code> strict and <code>#try!</code> lenient, moves Rails-compatible methods to a new <code>lib/rails</code> area, and schedules every deprecation for removal after 2027-09-30.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#400--2026-09-27">Read changes <span aria-hidden="true">↗</span></a></div></article>
1112
<article class="timeline-item" id="facets-3-2-2"><div class="timeline-date"><strong>3.2.2</strong><span>15 JUN 2026</span></div><div><h3>Compatibility, polished</h3><p>Fixes range intersection on Ruby 3.1 and 3.2, restores <code>Range#overlap?</code> where Ruby does not provide it, and corrects <code>Binding#caller_locations</code> argument handling.</p><a class="text-link" href="https://github.com/rubyworks/facets/blob/main/HISTORY.md#322--2026-06-15">Read changes <span aria-hidden="true">↗</span></a></div></article>

‎lib/core/facets/version.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Facets
2-
VERSION = '4.1.0'
2+
VERSION = '4.2.0'
33
end

0 commit comments

Comments
 (0)