There's a large chain of `if/else` in this sequence:

* `if name == :pending` / else
* `if pending` / else
* within `wrap_pending_block`, `if String === pending` / else
* again, within `wrap_pending_block`, `if block` / else

It feels unnecessarily complicated but no overarching simplifications are coming to mind, either.  Any ideas if we can reduce the profusion of branching?