Skip to content

Commit eddafc8

Browse files
transclaude
andcommitted
Declare ostruct test dependency; release 3.2.2
ostruct is deprecated in Ruby 3.4 and removed from the default gems in Ruby 3.5, so it must be declared explicitly. Add it to the test group (fixes the Ruby head / jruby CI legs) and document on facets/ostruct that it now requires the ostruct gem on 3.5+, and that Facets may divest the OpenStruct extensions in a future release. Rolls up the post-3.2.1 cross-version fixes (Range.intersection on 3.1/3.2, guarded Range#overlap? backfill) into 3.2.2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 61ce102 commit eddafc8

5 files changed

Lines changed: 36 additions & 2 deletions

File tree

‎Gemfile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ group :test do
66
gem 'rubytest-cli'
77
gem 'rake'
88
gem 'simplecov'
9+
gem 'ostruct' # no longer a default gem as of Ruby 3.5; needed by facets/ostruct tests
910
end
1011

1112
group :guard do

‎HISTORY.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
# Facets Release History
22

3+
## 3.2.2 / 2026-06-15
4+
5+
Patch release with cross-version fixes surfaced by CI on Ruby 3.1–3.4.
6+
7+
Changes:
8+
9+
* Bug Fixes
10+
11+
* Fix `Range.intersection` on Ruby 3.1 and 3.2. It relied on `Range#overlap?`,
12+
which only exists in Ruby 3.3+; replaced with an explicit overlap test that
13+
works on any Ruby and any comparable element type.
14+
* Restore `Range#overlap?` for Ruby < 3.3. It was dropped in 3.2.0 (since Ruby
15+
3.3 added a native one), which left 3.1/3.2 users without it. It is now
16+
defined only when missing, so it never replaces the built-in on 3.3+.
17+
18+
* Internal
19+
20+
* Add `ostruct` to the test dependencies. `ostruct` is deprecated in Ruby 3.4
21+
and removed from the default gems in Ruby 3.5, so it must be declared
22+
explicitly. Facets' OpenStruct extensions (`require 'facets/ostruct'`) still
23+
work, but now require the `ostruct` gem to be installed on Ruby 3.5+. These
24+
extensions may be divested from Facets in a future release.
25+
326
## 3.2.1 / 2026-06-14
427

528
Patch release that fixes the broken 3.2.0 release. 3.2.0 shipped with stale

‎facets.gemspec‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = 'facets'
3-
s.version = '3.2.1'
3+
s.version = '3.2.2'
44
s.summary = 'The premier collection of extension methods for Ruby.'
55
s.description = 'Facets is the premier collection of extension methods for the Ruby ' \
66
'programming language. Facets extensions are unique by virtue of their ' \

‎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 = '3.2.1'
2+
VERSION = '3.2.2'
33
end

‎lib/standard/facets/ostruct.rb‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# Facets' extensions to Ruby's OpenStruct.
2+
#
3+
# NOTE: `ostruct` is deprecated as of Ruby 3.4 and is no longer a default gem
4+
# as of Ruby 3.5 — it must be installed/declared explicitly to be available
5+
# (`gem install ostruct`, or add `ostruct` to your Gemfile/gemspec). The gem
6+
# itself still exists, so these extensions continue to work on top of it.
7+
#
8+
# Given OpenStruct's deprecation, Facets may divest these extensions in a
9+
# future release.
10+
111
require 'ostruct'
212
require 'facets/ostruct/initialize'
313
require 'facets/ostruct/to_ostruct'

0 commit comments

Comments
 (0)