Skip to content

Commit

Permalink
be more explicit with ::Async
Browse files Browse the repository at this point in the history
  • Loading branch information
milestruecar committed Jul 20, 2023
1 parent 8be8667 commit e4f877b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/slack/real_time/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def run_handlers(type, data)
handlers = store.class.events[type.to_s]
case async_handlers
when :all
Async.run { handlers_loop(handlers, data) }
::Async.run { handlers_loop(handlers, data) }
when :none
handlers_loop(handlers, data)
else
Expand Down
4 changes: 2 additions & 2 deletions spec/slack/real_time/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@
client.async_handlers = :none
end

it 'returns an Async::Task' do
expect(client.send(:run_handlers, 'example', {})).to be_a Async::Task
it 'returns an ::Async::Task' do
expect(client.send(:run_handlers, 'example', {})).to be_a ::Async::Task
end
end

Expand Down

0 comments on commit e4f877b

Please sign in to comment.