@@ -591,7 +591,7 @@ def complete(*args)
591
591
end
592
592
593
593
# @return [Future]
594
- def evaluate_to ( *args , & block )
594
+ def evaluate_to ( *args , block )
595
595
complete true , block . call ( *args ) , nil
596
596
rescue => error
597
597
complete false , nil , error
@@ -741,7 +741,7 @@ def initialize(blocked_by_future, default_executor = :io, executor = default_exe
741
741
def on_completable ( done_future )
742
742
if done_future . success?
743
743
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 }
745
745
end
746
746
else
747
747
complete false , nil , done_future . reason
@@ -759,7 +759,7 @@ def initialize(blocked_by_future, default_executor = :io, executor = default_exe
759
759
760
760
def on_completable ( done_future )
761
761
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 }
763
763
else
764
764
complete true , done_future . value , nil
765
765
end
@@ -771,9 +771,9 @@ class ChainPromise < BlockedTaskPromise
771
771
772
772
def on_completable ( done_future )
773
773
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 }
775
775
else
776
- Concurrent . post_on ( @Executor , @Task ) { |task | evaluate_to & task }
776
+ Concurrent . post_on ( @Executor , @Task ) { |task | evaluate_to task }
777
777
end
778
778
end
779
779
end
0 commit comments