LATEST
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.
diff --git a/HISTORY.md b/HISTORY.md index 851e8864..8ea7065b 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,12 @@ # Facets Release History -## Unreleased +## 4.0.0 / 2026-09-27 + +A major release, because it changes behavior: `Kernel#try!` is now the +lenient variant and `#try` is strict, `require 'facets'` no longer loads +`Kernel#with`, and Rails-compatible methods move to the new `lib/rails` +area (still loaded by `require 'facets'` with a warning until 2027-09-30). +Every deprecation now names that same removal date. Changes: @@ -84,6 +90,10 @@ Changes: * Fix the qed demos, which had 8 failures and 2 errors. Most were stale expectations (`Array#from`, `#step`, `#arrange`, `String#similarity`) and the date demo held pasted irb output. + * CONTRIBUTING.md explains the test stack (RubyTest, Lemon, AE and QED) + and the `@uncommon` convention. + * The `String#trim` demo no longer drops random cases, so the QED + assertion count is the same on every run. ## 3.2.2 / 2026-06-15 diff --git a/README.md b/README.md index 571af288..f7b3806a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ This loads `ostruct` and Facets' OpenStruct extensions. On Ruby 3.5+, declare th - [Generated API documentation on RubyDoc.info](https://www.rubydoc.info/gems/facets) (check the displayed version) - [Release history](HISTORY.md) -In the published 3.2.2 gem, the split between `lib/core` and `lib/standard` is visible in API source paths. This helps you tell whether a method is loaded by `require 'facets'` or needs an explicit require. The development branch also has a new `lib/rails` area for Rails-compatible helpers; see the **Unreleased** section of the release history for details. +The split between `lib/core`, `lib/standard` and `lib/rails` is visible in API source paths. This helps you tell whether a method is loaded by `require 'facets'` or needs an explicit require. The `lib/rails` area, new in 4.0.0, holds Rails-compatible helpers; see the release history for details. ## Contribute diff --git a/docs/_src/index.erb b/docs/_src/index.erb index 9dd0d485..5f6e965d 100644 --- a/docs/_src/index.erb +++ b/docs/_src/index.erb @@ -8,7 +8,7 @@ Get started Explore the source -
Version 3.2.2 Ruby 3.1+ BSD 2-Clause
+Version 4.0.0 Ruby 3.1+ BSD 2-Clause
LATEST RELEASE
Version 3.2.2 includes compatibility fixes across Ruby 3.1–3.4, following the 3.2 modernization release.
Read the release notesLATEST RELEASE
Version 4.0.0 makes #try strict and #try! lenient, adds a lib/rails area for Rails-compatible methods, and gives every deprecation a removal date.
THE GUIDE
Install the gem, choose how much to load, and make Ruby feel a little more like yours.
01 / GET READY
Facets 3.2.2 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.
gem install facetsgem 'facets', require: falserequire: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.
01 / GET READY
Facets 4.0.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.
gem install facetsgem 'facets', require: falserequire: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.
02 / CHOOSE YOUR SCOPE
Most core extension methods are stored in individual files. You can require one method, a class's core methods, or the core collection.
# One method
require 'facets/array/to_ranges'
diff --git a/docs/_src/news.erb b/docs/_src/news.erb
index 1dabc1e1..0c63f194 100644
--- a/docs/_src/news.erb
+++ b/docs/_src/news.erb
@@ -1,6 +1,7 @@
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 3.2
The 3.2 series brings the library forward for Ruby 3.1 and newer. Work merged since 3.2.2 is listed under Unreleased in the release history.
- 3.2.215 JUN 2026LATEST
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
+LATEST RELEASES
Facets 4.0
Facets 4.0 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.0.027 SEP 2026LATEST
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 2026Compatibility, 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
3.2.114 JUN 2026Core loading restored
Repairs stale require paths that affected require 'facets' in 3.2.0, and adds a load-path regression check. Also adds OpenDSL and PIC.
Read changes
3.2.0APR 2026Modern Ruby foundation
Moves the minimum Ruby version to 3.1, adds methods such as Array#to_ranges and String#dashcase, and retires extensions now built into Ruby.
Read migration notes
diff --git a/docs/index.html b/docs/index.html
index 8b3409ba..aa317150 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -35,7 +35,7 @@ More of Ruby,
one method
at a time.
Get started
Explore the source
- Version 3.2.2 Ruby 3.1+ BSD 2-Clause
+ Version 4.0.0 Ruby 3.1+ BSD 2-Clause
@@ -78,7 +78,7 @@ More of Ruby,
one method
at a time.
- LATEST RELEASE
Fresh facets
for modern Ruby.
Version 3.2.2 includes compatibility fixes across Ruby 3.1–3.4, following the 3.2 modernization release.
Read the release notes RUBY FACETS3.2.2JUNE 2026
+ LATEST RELEASE
Fresh facets
for modern Ruby.
Version 4.0.0 makes #try strict and #try! lenient, adds a lib/rails area for Rails-compatible methods, and gives every deprecation a removal date.
Read the release notes RUBY FACETS4.0.0SEPTEMBER 2026
diff --git a/docs/learn.html b/docs/learn.html
index 07ad7ee2..a75b289a 100644
--- a/docs/learn.html
+++ b/docs/learn.html
@@ -27,7 +27,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 3.2.2 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.
TERMINALgem install facets
GEMFILEgem 'facets', require: false
require: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.
+ 01 / GET READY
Install Facets
Facets 4.0.0 requires Ruby 3.1 or newer. Install it directly with RubyGems or add it to a Bundler project.
TERMINALgem install facets
GEMFILEgem 'facets', require: false
require: false keeps Bundler from loading the entire core collection automatically, so you can choose the files your project needs.
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 23b33b15..7a9ad36c 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -26,8 +26,9 @@
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 3.2
The 3.2 series brings the library forward for Ruby 3.1 and newer. Work merged since 3.2.2 is listed under Unreleased in the release history.
- 3.2.215 JUN 2026LATEST
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
+LATEST RELEASES
Facets 4.0
Facets 4.0 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.0.027 SEP 2026LATEST
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 2026Compatibility, 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
3.2.114 JUN 2026Core loading restored
Repairs stale require paths that affected require 'facets' in 3.2.0, and adds a load-path regression check. Also adds OpenDSL and PIC.
Read changes
3.2.0APR 2026Modern Ruby foundation
Moves the minimum Ruby version to 3.1, adds methods such as Array#to_ranges and String#dashcase, and retires extensions now built into Ruby.
Read migration notes
diff --git a/lib/core/facets/version.rb b/lib/core/facets/version.rb
index 792dae15..d4c186a5 100644
--- a/lib/core/facets/version.rb
+++ b/lib/core/facets/version.rb
@@ -1,3 +1,3 @@
module Facets
- VERSION = '3.2.2'
+ VERSION = '4.0.0'
end