@@ -591,7 +591,7 @@ def complete(*args)
591591 end
592592
593593 # @return [Future]
594- def evaluate_to ( *args , & block )
594+ def evaluate_to ( *args , block )
595595 complete true , block . call ( *args ) , nil
596596 rescue => error
597597 complete false , nil , error
@@ -741,7 +741,7 @@ def initialize(blocked_by_future, default_executor = :io, executor = default_exe
741741 def on_completable ( done_future )
742742 if done_future . success?
743743 Concurrent . post_on ( @Executor , done_future , @Task ) do |done_future , task |
744- evaluate_to { done_future . apply_value done_future . value , task }
744+ evaluate_to lambda { done_future . apply_value done_future . value , task }
745745 end
746746 else
747747 complete false , nil , done_future . reason
@@ -759,7 +759,7 @@ def initialize(blocked_by_future, default_executor = :io, executor = default_exe
759759
760760 def on_completable ( done_future )
761761 if done_future . failed?
762- Concurrent . post_on ( @Executor , done_future . reason , @Task ) { |reason , task | evaluate_to reason , & task }
762+ Concurrent . post_on ( @Executor , done_future . reason , @Task ) { |reason , task | evaluate_to reason , task }
763763 else
764764 complete true , done_future . value , nil
765765 end
@@ -771,9 +771,9 @@ class ChainPromise < BlockedTaskPromise
771771
772772 def on_completable ( done_future )
773773 if Future === done_future
774- Concurrent . post_on ( @Executor , done_future , @Task ) { |future , task | evaluate_to *future . result , & task }
774+ Concurrent . post_on ( @Executor , done_future , @Task ) { |future , task | evaluate_to *future . result , task }
775775 else
776- Concurrent . post_on ( @Executor , @Task ) { |task | evaluate_to & task }
776+ Concurrent . post_on ( @Executor , @Task ) { |task | evaluate_to task }
777777 end
778778 end
779779 end
0 commit comments