cujojs/when — pull request #50 by kriskowal (2012-08-23 23:44:37+00:00)
Title: Fix infinite coercion with Q

Some promises, particularly Q promises, provide a valueOf method that
attempts to synchronously return the fulfilled value of the promise, or
returns the unresolved promise itself. Attempting to break a fulfillment
value out of a promise appears to be necessary to break cycles between
Q and When attempting to coerce each-other's promises in an infinite loop.
For promises that do not implement "valueOf", the Object#valueOf is harmless.
See: https://github.com/kriskowal/q/issues/106