Skip to content

Commit

Permalink
Set Rubocop’s target Ruby version to 3.0
Browse files Browse the repository at this point in the history
This is the oldest Ruby version the CI is configured to test.
  • Loading branch information
fmang committed Apr 29, 2024
1 parent 846e8b3 commit 4faefe3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
AllCops:
NewCops: enable
TargetRubyVersion: 3.0

Metrics/BlockLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

# each_key is not supported by Ruby 3.0.
Style/HashEachMethods:
Enabled: false

inherit_from: .rubocop_todo.yml
2 changes: 1 addition & 1 deletion lib/registry/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def parse_link_header(header)
links = {}

# Parse each part into a named link
parts.each_key do |part|
parts.each do |part, _index|
section = part.split(';')
url = section[0][/<(.*)>/, 1]
name = section[1][/rel="?([^"]*)"?/, 1].to_sym
Expand Down

0 comments on commit 4faefe3

Please sign in to comment.