Skip to content

Commit d896968

Browse files
committed
Update minimum Ruby version from 3.1 -> 3.2
Per https://endoflife.date/ruby - Ruby 3.1 will be unsupported as of 3/31/2025 Also update gems. Note: We update from `(*args, **kwargs)` -> `(...)` where possible, or at least from `(arg1, **kwargs)` -> `(arg1, **)`, because Rubocop for Ruby v3.2+ prefers `*` vs `*args` and `**` vs `**kwargs` for anonymous forwarding. However, `...` (for all argument forwarding) has been supported since Ruby 2.7, and I just missed this update in the past.
1 parent 7f20fc9 commit d896968

File tree

8 files changed

+49
-37
lines changed

8 files changed

+49
-37
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
ruby-version: ["3.1", "3.2", "3.3"]
24+
ruby-version: ["3.2", "3.3", "3.4"]
2525

2626
steps:
2727
- name: Checkout code

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inherit_gem:
88
gemwork: lib/rubocop/.rubocop-gems.yml
99

1010
AllCops:
11-
TargetRubyVersion: 3.1
11+
TargetRubyVersion: 3.2
1212

1313
Performance/OpenStruct:
1414
Enabled: false # Reconsider later.

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## [Unreleased]
22

3+
- Update minimum Ruby version from 3.1 -> 3.2
4+
35
### 0.7.0 - 2024-11-21
46

57
- Update minimum Ruby version from 2.7 -> 3.1

Gemfile.lock

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ GEM
99
ansi (1.5.0)
1010
ast (2.4.2)
1111
benchmark-ips (2.14.0)
12-
bigdecimal (3.1.8)
12+
bigdecimal (3.1.9)
1313
builder (3.3.0)
1414
concurrent-ruby (1.3.4)
15-
debug (1.9.2)
15+
date (3.4.1)
16+
debug (1.10.0)
1617
irb (~> 1.10)
1718
reline (>= 0.3.8)
1819
docile (1.4.1)
@@ -24,7 +25,7 @@ GEM
2425
logger
2526
zeitwerk (~> 2.6)
2627
dry-inflector (1.1.0)
27-
dry-initializer (3.1.1)
28+
dry-initializer (3.2.0)
2829
dry-logic (1.5.0)
2930
concurrent-ruby (~> 1.0)
3031
dry-core (~> 1.0, < 2)
@@ -44,7 +45,7 @@ GEM
4445
dry-inflector (~> 1.0)
4546
dry-logic (~> 1.4)
4647
zeitwerk (~> 2.6)
47-
gemwork (0.7.2)
48+
gemwork (0.7.4)
4849
debug
4950
irb
5051
minitest
@@ -57,57 +58,58 @@ GEM
5758
rubocop-rake
5859
simplecov
5960
yard
60-
io-console (0.7.2)
61-
irb (1.14.1)
61+
io-console (0.8.0)
62+
irb (1.14.3)
6263
rdoc (>= 4.0.0)
6364
reline (>= 0.4.2)
64-
json (2.8.2)
65+
json (2.9.1)
6566
language_server-protocol (3.17.0.3)
66-
logger (1.6.1)
67-
minitest (5.25.2)
67+
logger (1.6.4)
68+
minitest (5.25.4)
6869
minitest-reporters (1.7.1)
6970
ansi
7071
builder
7172
minitest (>= 5.0)
7273
ruby-progressbar
7374
much-stub (0.1.10)
74-
object_identifier (0.8.0)
75+
object_identifier (0.10.0)
7576
parallel (1.26.3)
7677
parser (3.3.6.0)
7778
ast (~> 2.4.1)
7879
racc
79-
psych (5.2.0)
80+
psych (5.2.2)
81+
date
8082
stringio
8183
racc (1.8.1)
8284
rainbow (3.1.1)
8385
rake (13.2.1)
84-
rdoc (6.8.1)
86+
rdoc (6.10.0)
8587
psych (>= 4.0.0)
8688
reek (6.3.0)
8789
dry-schema (~> 1.13.0)
8890
parser (~> 3.3.0)
8991
rainbow (>= 2.0, < 4.0)
9092
rexml (~> 3.1)
91-
regexp_parser (2.9.2)
92-
reline (0.5.11)
93+
regexp_parser (2.10.0)
94+
reline (0.6.0)
9395
io-console (~> 0.5)
94-
rexml (3.3.9)
95-
rubocop (1.68.0)
96+
rexml (3.4.0)
97+
rubocop (1.69.2)
9698
json (~> 2.3)
9799
language_server-protocol (>= 3.17.0)
98100
parallel (~> 1.10)
99101
parser (>= 3.3.0.2)
100102
rainbow (>= 2.2.2, < 4.0)
101-
regexp_parser (>= 2.4, < 3.0)
102-
rubocop-ast (>= 1.32.2, < 2.0)
103+
regexp_parser (>= 2.9.3, < 3.0)
104+
rubocop-ast (>= 1.36.2, < 2.0)
103105
ruby-progressbar (~> 1.7)
104-
unicode-display_width (>= 2.4.0, < 3.0)
105-
rubocop-ast (1.36.1)
106+
unicode-display_width (>= 2.4.0, < 4.0)
107+
rubocop-ast (1.37.0)
106108
parser (>= 3.3.1.0)
107109
rubocop-minitest (0.36.0)
108110
rubocop (>= 1.61, < 2.0)
109111
rubocop-ast (>= 1.31.1, < 2.0)
110-
rubocop-performance (1.23.0)
112+
rubocop-performance (1.23.1)
111113
rubocop (>= 1.48.1, < 2.0)
112114
rubocop-ast (>= 1.31.1, < 2.0)
113115
rubocop-rake (0.6.0)
@@ -120,9 +122,11 @@ GEM
120122
simplecov-html (0.13.1)
121123
simplecov_json_formatter (0.1.4)
122124
stringio (3.1.2)
123-
unicode-display_width (2.6.0)
125+
unicode-display_width (3.1.3)
126+
unicode-emoji (~> 4.0, >= 4.0.4)
127+
unicode-emoji (4.0.4)
124128
yard (0.9.37)
125-
zeitwerk (2.6.18)
129+
zeitwerk (2.7.1)
126130

127131
PLATFORMS
128132
arm64-darwin-23
@@ -137,4 +141,4 @@ DEPENDENCIES
137141
rake
138142

139143
BUNDLED WITH
140-
2.3.27
144+
2.6.2

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,17 @@ Or install it yourself:
2929

3030
Tested MRI Ruby Versions:
3131

32-
- 3.1
3332
- 3.2
3433
- 3.3
34+
- 3.4
3535

36-
Note: For Ruby 2.7 or 3.1 support, install object_inspector gem version 0.6.3.
36+
For Ruby 2.7 support, install object_inspector gem version 0.6.3.
37+
38+
```ruby
39+
gem "object_inspector", "0.6.3"
40+
```
41+
42+
For Ruby 3.1 support, install object_inspector gem version 0.7.0.
3743

3844
```ruby
3945
gem "object_inspector", "0.6.3"

lib/object_inspector/inspectors_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module ObjectInspector::InspectorsHelper
88
# passing it the passed in `kwargs` (keyword arguments).
99
#
1010
# @return [String]
11-
def inspect(object = self, **kwargs)
12-
ObjectInspector::Inspector.inspect(object, **kwargs)
11+
def inspect(object = self, ...)
12+
ObjectInspector::Inspector.inspect(object, ...)
1313
end
1414
end

object_inspector.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
1212
spec.description = "Object Inspector takes Object#inspect to the next level. Specify any combination of identification attributes, flags, issues, info, and/or a name along with an optional, self-definable scope option to represents objects. Great for the console, logging, etc."
1313
spec.homepage = "https://github.com/pdobb/object_inspector"
1414
spec.license = "MIT"
15-
spec.required_ruby_version = ">= 3.1"
15+
spec.required_ruby_version = ">= 3.2"
1616

1717
spec.metadata = {
1818
"bug_tracker_uri" => "https://github.com/pdobb/object_inspector/issues",

test/object_inspector/inspectors_helper_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ def initialize(full_test_object)
6363
@full_test_object = full_test_object
6464
end
6565

66-
def inspect(**kwargs)
66+
def inspect(**)
6767
super(
6868
identification: self.class.name,
6969
name: nil,
7070
flags: nil,
7171
info: nil,
7272
issues: nil,
73-
**kwargs)
73+
**)
7474
end
7575

7676
def to_model
@@ -79,13 +79,13 @@ def to_model
7979

8080
private
8181

82-
def method_missing(method_symbol, *args)
83-
@full_test_object.__send__(method_symbol, *args)
82+
def method_missing(method_symbol, ...)
83+
@full_test_object.__send__(method_symbol, ...)
8484
end
8585

8686
# :reek:ManualDispatch
87-
def respond_to_missing?(*args)
88-
@full_test_object.respond_to?(*args) || super
87+
def respond_to_missing?(...)
88+
@full_test_object.respond_to?(...) || super
8989
end
9090
end
9191
end

0 commit comments

Comments
 (0)