Skip to content

Commit

Permalink
Avoid possible flattening in Promise::When#map
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Dec 25, 2013
1 parent b22350c commit 100adab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/promise.rb
Expand Up @@ -239,7 +239,7 @@ def collect(&block)
raise ArgumentError, 'no block given' unless block

self.then {|values|
Promise.when values.map(&block)
When.new(values.map(&block))
}
end

Expand Down

0 comments on commit 100adab

Please sign in to comment.