Skip to content

Commit ed06f19

Browse files
Update dev deps and drop Ruby 2.x support (#6)
1 parent 617a3c2 commit ed06f19

File tree

5 files changed

+55
-41
lines changed

5 files changed

+55
-41
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
name: CI
22
on:
33
push:
4-
branches: "*"
4+
branches:
5+
- "*"
56
pull_request:
6-
branches: "*"
7+
branches:
8+
- "*"
79
jobs:
810
test:
911
runs-on: ubuntu-latest
1012
strategy:
1113
matrix:
1214
ruby-version:
13-
- "2.6"
14-
- "2.7"
1515
- "3.0"
1616
- "3.1"
1717
- "3.2"
1818
- "3.3"
19+
- "3.4"
1920
steps:
2021
- uses: actions/checkout@v4
2122
- name: Set up Ruby

.rubocop.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
require:
1+
plugins:
22
- rubocop-rake
33
- rubocop-minitest
44

55
AllCops:
6-
TargetRubyVersion: 2.6
6+
TargetRubyVersion: 3.0
77
NewCops: enable
88

99
Style/StringLiterals:
@@ -42,3 +42,6 @@ Minitest/AssertInDelta:
4242

4343
Gemspec/DevelopmentDependencies:
4444
EnforcedStyle: gemspec
45+
46+
Style/MapIntoArray:
47+
Enabled: false

Gemfile.lock

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,66 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9-
ast (2.4.2)
10-
docile (1.4.0)
11-
json (2.7.1)
12-
minitest (5.22.2)
13-
parallel (1.24.0)
14-
parser (3.3.0.5)
9+
ast (2.4.3)
10+
docile (1.4.1)
11+
json (2.11.3)
12+
language_server-protocol (3.17.0.4)
13+
lint_roller (1.1.0)
14+
minitest (5.25.5)
15+
parallel (1.27.0)
16+
parser (3.3.8.0)
1517
ast (~> 2.4.1)
1618
racc
17-
racc (1.7.3)
19+
prism (1.4.0)
20+
racc (1.8.1)
1821
rainbow (3.1.1)
19-
rake (13.1.0)
20-
regexp_parser (2.9.0)
21-
rexml (3.2.6)
22-
rubocop (1.50.2)
22+
rake (13.2.1)
23+
regexp_parser (2.10.0)
24+
rubocop (1.75.5)
2325
json (~> 2.3)
26+
language_server-protocol (~> 3.17.0.2)
27+
lint_roller (~> 1.1.0)
2428
parallel (~> 1.10)
25-
parser (>= 3.2.0.0)
29+
parser (>= 3.3.0.2)
2630
rainbow (>= 2.2.2, < 4.0)
27-
regexp_parser (>= 1.8, < 3.0)
28-
rexml (>= 3.2.5, < 4.0)
29-
rubocop-ast (>= 1.28.0, < 2.0)
31+
regexp_parser (>= 2.9.3, < 3.0)
32+
rubocop-ast (>= 1.44.0, < 2.0)
3033
ruby-progressbar (~> 1.7)
31-
unicode-display_width (>= 2.4.0, < 3.0)
32-
rubocop-ast (1.30.0)
33-
parser (>= 3.2.1.0)
34-
rubocop-minitest (0.30.0)
35-
rubocop (>= 1.39, < 2.0)
36-
rubocop-rake (0.6.0)
37-
rubocop (~> 1.0)
34+
unicode-display_width (>= 2.4.0, < 4.0)
35+
rubocop-ast (1.44.1)
36+
parser (>= 3.3.7.2)
37+
prism (~> 1.4)
38+
rubocop-minitest (0.38.0)
39+
lint_roller (~> 1.1)
40+
rubocop (>= 1.75.0, < 2.0)
41+
rubocop-ast (>= 1.38.0, < 2.0)
42+
rubocop-rake (0.7.1)
43+
lint_roller (~> 1.1)
44+
rubocop (>= 1.72.1)
3845
ruby-progressbar (1.13.0)
3946
simplecov (0.22.0)
4047
docile (~> 1.1)
4148
simplecov-html (~> 0.11)
4249
simplecov_json_formatter (~> 0.1)
43-
simplecov-html (0.12.3)
50+
simplecov-html (0.13.1)
4451
simplecov_json_formatter (0.1.4)
45-
unicode-display_width (2.5.0)
52+
unicode-display_width (3.1.4)
53+
unicode-emoji (~> 4.0, >= 4.0.4)
54+
unicode-emoji (4.0.4)
4655

4756
PLATFORMS
57+
arm64-darwin-22
4858
ruby
4959

5060
DEPENDENCIES
5161
bundler
5262
dotstrings!
53-
minitest (~> 5.14)
63+
minitest (~> 5.25)
5464
rake
55-
rubocop (~> 1.50.2)
56-
rubocop-minitest (~> 0.30.0)
65+
rubocop (~> 1.75)
66+
rubocop-minitest (~> 0.38)
5767
rubocop-rake
5868
simplecov
5969

6070
BUNDLED WITH
61-
2.2.18
71+
2.4.22

dotstrings.gemspec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Gem::Specification.new do |s|
1515
s.license = 'MIT'
1616

1717
s.add_development_dependency 'bundler'
18-
s.add_development_dependency 'minitest', '~> 5.14'
18+
s.add_development_dependency 'minitest', '~> 5.25'
1919
s.add_development_dependency 'rake'
20-
s.add_development_dependency 'rubocop', '~> 1.50.2'
21-
s.add_development_dependency 'rubocop-minitest', '~> 0.30.0'
20+
s.add_development_dependency 'rubocop', '~> 1.75'
21+
s.add_development_dependency 'rubocop-minitest', '~> 0.38'
2222
s.add_development_dependency 'rubocop-rake'
2323
s.add_development_dependency 'simplecov'
2424

25-
s.required_ruby_version = '>= 2.6.0'
25+
s.required_ruby_version = '>= 3.0.0'
2626
s.metadata['rubygems_mfa_required'] = 'true'
2727
end

lib/dotstrings/parser.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Parser
2525
TOK_T = 't'
2626
TOK_CAP_U = 'U'
2727
TOK_ZERO = '0'
28-
TOK_HEX_DIGIT = /[0-9a-fA-F]/.freeze
28+
TOK_HEX_DIGIT = /[0-9a-fA-F]/
2929

3030
# States
3131
STATE_START = 0
@@ -232,7 +232,7 @@ def parse_unicode(ch, &block)
232232

233233
codepoint = @unicode_buffer.join.hex
234234

235-
if codepoint >= 0xD800 && codepoint <= 0xDBFF
235+
if codepoint.between?(0xD800, 0xDBFF)
236236
unless @high_surrogate.nil?
237237
raise_error(
238238
'Found a high surrogate code point after another high surrogate'
@@ -241,7 +241,7 @@ def parse_unicode(ch, &block)
241241

242242
@high_surrogate = codepoint
243243
@state = STATE_UNICODE_SURROGATE
244-
elsif codepoint >= 0xDC00 && codepoint <= 0xDFFF
244+
elsif codepoint.between?(0xDC00, 0xDFFF)
245245
if @high_surrogate.nil?
246246
raise_error(
247247
'Found a low surrogate code point before a high surrogate'

0 commit comments

Comments
 (0)