FIX: `LocalJumpError` in rake tasks (PR #14874)

return isn’t allowed in a block context. A followup to #14865

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there: