Skip to content

Commit 863d550

Browse files
committed
Modernize code.
1 parent 9e11aef commit 863d550

File tree

14 files changed

+25
-14
lines changed

14 files changed

+25
-14
lines changed

.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

async.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
77
spec.version = Async::VERSION
88

99
spec.summary = "A concurrency framework for Ruby."
10-
spec.authors = ["Samuel Williams", "Bruno Sutic", "Jeremy Jung", "Olle Jonsson", "Patrik Wenger", "Devin Christensen", "Emil Tin", "Jamie McCarthy", "Kent Gruber", "Alan Wu", "Brian Morearty", "Colin Kelley", "Dimitar Peychinov", "Gert Goet", "Jahfer Husain", "Jiang Jinyang", "Julien Portalier", "Jun Jiang", "Ken Muryoi", "Leon Löchner", "Mark Montroy", "Masafumi Okura", "Masayuki Yamamoto", "Math Ieu", "Ryan Musgrave", "Salim Semaoune", "Shannon Skipper", "Shigeru Nakajima", "Shopify Inc.", "Sokolov Yura", "Stefan Wrobel", "Trevor Turk"]
10+
spec.authors = ["Samuel Williams", "Bruno Sutic", "Jeremy Jung", "Olle Jonsson", "Patrik Wenger", "Devin Christensen", "Shopify Inc.", "Emil Tin", "Jamie McCarthy", "Kent Gruber", "Alan Wu", "Brian Morearty", "Colin Kelley", "Dimitar Peychinov", "Gert Goet", "Jahfer Husain", "Jiang Jinyang", "Julien Portalier", "Jun Jiang", "Ken Muryoi", "Leon Löchner", "Mark Montroy", "Masafumi Okura", "Masayuki Yamamoto", "Math Ieu", "Ryan Musgrave", "Salim Semaoune", "Shannon Skipper", "Shigeru Nakajima", "Sokolov Yura", "Stefan Wrobel", "Trevor Turk"]
1111
spec.license = "MIT"
1212

1313
spec.cert_chain = ["release.cert"]

benchmark/async/barrier.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# frozen_string_literal: true
22

3+
# Released under the MIT License.
34
# Copyright, 2025, by Samuel Williams.
45

56
require "async/barrier"

benchmark/rubies/benchmark.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def write(buffer)
194194
workers.push f
195195
end
196196

197-
workers.each { |f| f.resume }
197+
workers.each {|f| f.resume}
198198

199199
master_fiber = Fiber.new do
200200
NUM_WORKERS.times do |worker_num|

fixtures/async/a_queue.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module Async
7676
end
7777

7878
it "can enqueue multiple items" do
79-
items = Array.new(10) { rand(10) }
79+
items = Array.new(10) {rand(10)}
8080

8181
reactor.async do |task|
8282
queue.enqueue(*items)

lib/async/barrier.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, 2019-2024, by Samuel Williams.
4+
# Copyright, 2019-2025, by Samuel Williams.
55

66
require_relative "list"
77
require_relative "task"

lib/async/list.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, 2022-2024, by Samuel Williams.
4+
# Copyright, 2022-2025, by Samuel Williams.
55

66
module Async
77
# A general doublely linked list. This is used internally by {Async::Barrier} and {Async::Condition} to manage child tasks.

lib/async/notification.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, 2018-2024, by Samuel Williams.
4+
# Copyright, 2018-2025, by Samuel Williams.
55

66
require_relative "condition"
77

lib/traces/provider/async/barrier.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, 2024, by Samuel Williams.
4+
# Copyright, 2024-2025, by Samuel Williams.
55

66
require_relative "../../../async/barrier"
77
require "traces/provider"

0 commit comments

Comments
 (0)