I'd simplify this, by directly passing the an $ensure.