Skip to content

Commit 4e91c53

Browse files
committed
Don't accept blocks on DSL#step or DSL#set
1 parent d42401a commit 4e91c53

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/pathway.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ def run(&)
158158
end
159159

160160
# Execute step and preserve the former state
161-
def step(callable, *, **, &)
162-
bl = _callable(callable, &)
161+
def step(callable, *, **)
162+
bl = _callable(callable)
163163
@result = @result.tee { |state| bl.call(state, *, **) }
164164
end
165165

166166
# Execute step and modify the former state setting the key
167-
def set(callable, *args, to: @operation.result_key, **kwargs, &)
168-
bl = _callable(callable, &)
167+
def set(callable, *args, to: @operation.result_key, **kwargs)
168+
bl = _callable(callable)
169169

170170
@result = @result.then do |state|
171171
wrap(bl.call(state, *args, **kwargs))

0 commit comments

Comments
 (0)