Skip to content

Commit 3729f82

Browse files
committed
Modernize code.
1 parent 84e03fb commit 3729f82

14 files changed

Lines changed: 34 additions & 27 deletions

File tree

.github/workflows/test-coverage.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
- macos
2222

2323
ruby:
24-
- "3.1"
2524
- "3.2"
2625
- "3.3"
2726
- "3.4"

.github/workflows/test-external.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ jobs:
5252
# env:
5353
# IO_EVENT_SELECTOR: Select
5454
# timeout-minutes: 10
55-
# run: bundle exec bake build test:external
55+
# run: bundle exec bake build test:external

.github/workflows/test.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- windows
2323

2424
ruby:
25-
- "3.1"
2625
- "3.2"
2726
- "3.3"
2827
- "3.4"

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/.bundle/
2-
/pkg/
1+
/.bundle
2+
/pkg
33
/gems.locked
44
/.covered.db
55
/external

.rubocop.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ Layout/EmptyLinesAroundModuleBody:
4848
Layout/EmptyLineAfterMagicComment:
4949
Enabled: true
5050

51+
Layout/SpaceInsideBlockBraces:
52+
Enabled: true
53+
EnforcedStyle: no_space
54+
SpaceBeforeBlockParameters: false
55+
56+
Layout/SpaceAroundBlockParameters:
57+
Enabled: true
58+
EnforcedStyleInsidePipes: no_space
59+
5160
Style/FrozenStringLiteralComment:
5261
Enabled: true
5362

fixtures/io/event/test_scheduler.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@ def wakeup
160160
@selector.wakeup
161161
end
162162
end
163-
end
163+
end

io-event.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
77
spec.version = IO::Event::VERSION
88

99
spec.summary = "An event loop."
10-
spec.authors = ["Samuel Williams", "Math Ieu", "Wander Hillen", "Jean Boussier", "Benoit Daloze", "Bruno Sutic", "Alex Matchneer", "Anthony Ross", "Delton Ding", "Pavel Rosický", "Shizuo Fujita", "Stanislav (Stas) Katkov"]
10+
spec.authors = ["Samuel Williams", "Math Ieu", "Wander Hillen", "Jean Boussier", "Benoit Daloze", "Bruno Sutic", "Shizuo Fujita", "Alex Matchneer", "Anthony Ross", "Delton Ding", "Pavel Rosický", "Stanislav (Stas) Katkov"]
1111
spec.license = "MIT"
1212

1313
spec.cert_chain = ["release.cert"]
@@ -20,10 +20,10 @@ Gem::Specification.new do |spec|
2020
"source_code_uri" => "https://github.com/socketry/io-event.git",
2121
}
2222

23-
spec.files = Dir["ext/extconf.rb", "ext/io/**/*.{c,h}", "{lib}/**/*", "*.md", base: __dir__]
23+
spec.files = Dir["{ext,lib}/**/*", "*.md", base: __dir__]
2424
spec.require_paths = ["lib"]
2525

2626
spec.extensions = ["ext/extconf.rb"]
2727

28-
spec.required_ruby_version = ">= 3.1"
28+
spec.required_ruby_version = ">= 3.2"
2929
end

lib/io/event/priority_heap.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def clear!
8282
# Validate the heap invariant. Every element except the root must not be smaller than its parent element. Note that it MAY be equal.
8383
def valid?
8484
# Notice we skip index 0 on purpose, because it has no parent
85-
(1..(@contents.size - 1)).all? { |e| @contents[e] >= @contents[(e - 1) / 2] }
85+
(1..(@contents.size - 1)).all? {|index| @contents[index] >= @contents[(index - 1) / 2]}
8686
end
8787

8888
private

lib/io/event/selector/select.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
# Released under the MIT License.
4-
# Copyright, 2021-2024, by Samuel Williams.
4+
# Copyright, 2021-2025, by Samuel Williams.
55
# Copyright, 2023, by Math Ieu.
66

77
require_relative "../interrupt"

license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Copyright, 2022, by Bruno Sutic.
99
Copyright, 2023, by Math Ieu.
1010
Copyright, 2024, by Pavel Rosický.
1111
Copyright, 2024, by Anthony Ross.
12-
Copyright, 2024, by Shizuo Fujita.
12+
Copyright, 2024-2025, by Shizuo Fujita.
1313
Copyright, 2024, by Jean Boussier.
1414
Copyright, 2025, by Stanislav (Stas) Katkov.
1515

0 commit comments

Comments
 (0)