Skip to content

Commit

Permalink
Consistent syntax for Kernel.raise.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Aug 4, 2024
1 parent ee6871b commit 91812e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/async/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def process_wait(pid, flags)
# @parameter timeout [Float | Nil] The maximum timeout, or if nil, indefinite.
# @returns [Boolean] Whether there is more work to do.
def run_once(timeout = nil)
Kernel::raise "Running scheduler on non-blocking fiber!" unless Fiber.blocking?
Kernel.raise "Running scheduler on non-blocking fiber!" unless Fiber.blocking?

# If we are finished, we stop the task tree and exit:
if self.finished?
Expand Down Expand Up @@ -367,7 +367,7 @@ def run_once(timeout = nil)

# Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided.
def run(...)
Kernel::raise ClosedError if @selector.nil?
Kernel.raise ClosedError if @selector.nil?

initial_task = self.async(...) if block_given?
interrupt = nil
Expand Down Expand Up @@ -409,7 +409,7 @@ def run(...)
# @returns [Task] The task that was scheduled into the reactor.
# @deprecated With no replacement.
def async(*arguments, **options, &block)
Kernel::raise ClosedError if @selector.nil?
Kernel.raise ClosedError if @selector.nil?

task = Task.new(Task.current? || self, **options, &block)

Expand Down

0 comments on commit 91812e1

Please sign in to comment.