@@ -58,7 +58,7 @@ def default_message_for(type)
5858 class State
5959 extend Forwardable
6060
61- delegate %i( [ ] []= fetch store include? values_at deconstruct_keys ) => :@hash
61+ delegate %i[ [ ] []= fetch store include? values_at deconstruct_keys ] => :@hash
6262
6363 def initialize ( operation , values = { } )
6464 @hash = operation . context . merge ( values )
@@ -158,27 +158,17 @@ def run(&)
158158 end
159159
160160 # Execute step and preserve the former state
161- def step ( callable , ...)
162- #:nocov:
163- if block_given?
164- warn "[DEPRECATION] Passing a block to the step method using `DSLMethods#step` is deprecated"
165- end
166- #:nocov:
167- bl = _callable ( callable )
168- @result = @result . tee { |state | bl . call ( state , ...) }
161+ def step ( callable , *, **, &)
162+ bl = _callable ( callable , &)
163+ @result = @result . tee { |state | bl . call ( state , *, **) }
169164 end
170165
171166 # Execute step and modify the former state setting the key
172- def set ( callable , *args , to : @operation . result_key , **kwargs , &bl )
173- #:nocov:
174- if block_given?
175- warn "[DEPRECATION] Passing a block to the step method using `DSLMethods#set` is deprecated"
176- end
177- #:nocov:
178- bl = _callable ( callable )
167+ def set ( callable , *args , to : @operation . result_key , **kwargs , &)
168+ bl = _callable ( callable , &)
179169
180170 @result = @result . then do |state |
181- wrap ( bl . call ( state , *args , **kwargs , & bl ) )
171+ wrap ( bl . call ( state , *args , **kwargs ) )
182172 . then { |value | state . update ( to => value ) }
183173 end
184174 end
0 commit comments