Skip to content

Commit c0f9502

Browse files
authored
Node#wait should return nil.
1 parent 4392877 commit c0f9502

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/async/node.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def stop(later = false)
300300
#
301301
# @returns [self] Returns self for method chaining.
302302
def wait
303-
self
303+
nil
304304
end
305305

306306
# Whether the node has been stopped.

test/async/node.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@
315315
with "#wait" do
316316
it "returns self for a plain node" do
317317
result = node.wait
318-
expect(result).to be_equal(node)
318+
expect(result).to be_nil
319319
end
320320
end
321321
end

0 commit comments

Comments
 (0)