Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Promise.when yielding value when a promise acts
  • Loading branch information
meh committed Jan 1, 2014
1 parent a773819 commit 9dadbb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stdlib/promise.rb
Expand Up @@ -258,6 +258,10 @@ def wait(promise)
promise = Promise.value(promise)
end

if promise.act?
promise = promise.then
end

@wait << promise

promise.always {
Expand Down

0 comments on commit 9dadbb0

Please sign in to comment.