Skip to content

Commit

Permalink
Allow parameter less promise realization
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Mar 14, 2014
1 parent 8b5a84f commit 8ae7056
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stdlib/promise.rb
Expand Up @@ -74,7 +74,7 @@ def >>(promise)
self
end

def resolve(value)
def resolve(value = nil)
if realized?
raise ArgumentError, 'the promise has already been realized'
end
Expand Down Expand Up @@ -109,7 +109,7 @@ def resolve!(value)
end
end

def reject(value)
def reject(value = nil)
if realized?
raise ArgumentError, 'the promise has already been realized'
end
Expand Down

0 comments on commit 8ae7056

Please sign in to comment.