We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce4fe75 commit 8217cb4Copy full SHA for 8217cb4
lib/concurrent/actress/ad_hoc.rb
@@ -2,12 +2,12 @@ module Concurrent
2
module Actress
3
class AdHoc
4
include Context
5
- def initialize(&initializer)
6
- @on_message = Type! initializer.call, Proc
+ def initialize(*args, &initializer)
+ @on_message = Type! initializer.call(*args), Proc
7
end
8
9
def on_message(message)
10
- @on_message.call message
+ instance_exec message, &@on_message
11
12
13
0 commit comments