Skip to content

Commit b0a6884

Browse files
committed
fix core methods return values
1 parent dbd1144 commit b0a6884

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/concurrent/actress/core.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def add_child(child)
7070
guard!
7171
Type! child, Reference
7272
@children.add child
73-
self
73+
nil
7474
end
7575

7676
# @api private
@@ -79,7 +79,7 @@ def remove_child(child)
7979
Type! child, Reference
8080
@children.delete child
8181
end
82-
self
82+
nil
8383
end
8484

8585
# is executed by Reference scheduling processing of new messages
@@ -94,7 +94,7 @@ def on_envelope(envelope)
9494
end
9595
process_envelopes?
9696
end
97-
self
97+
nil
9898
end
9999

100100
# @note Actor rejects envelopes when terminated.
@@ -115,7 +115,8 @@ def terminate!
115115
end
116116
@mailbox.clear
117117
# TODO terminate all children
118-
self
118+
119+
nil
119120
end
120121

121122
# @api private
@@ -153,6 +154,8 @@ def receive_envelope
153154

154155
result = @actress.on_envelope envelope
155156
envelope.ivar.set result unless envelope.ivar.nil?
157+
158+
nil
156159
rescue => error
157160
log ERROR, error
158161
envelope.ivar.fail error unless envelope.ivar.nil?
@@ -175,7 +178,8 @@ def schedule_execution
175178
Thread.current[:__current_actress__] = nil
176179
end
177180
end
178-
self
181+
182+
nil
179183
end
180184

181185
def reject_envelope(envelope)

0 commit comments

Comments
 (0)