mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 18:12:46 +08:00
Using `return` inside a block attempts to return from the enclosing method rather than from the block itself. In Sidekiq's `job_retry` context this raises `LocalJumpError: unexpected return`, which shows up in logs as: ``` Job exception: unexpected return ``` The correct Ruby idiom for exiting a block with a value is `next <value>`. Four jobs had the same pattern: - `app/jobs/regular/user_email.rb` - `app/jobs/regular/group_smtp_email.rb` - `app/jobs/regular/notify_mailing_list_subscribers.rb` - `plugins/automation/app/jobs/regular/discourse_automation/trigger.rb` |
||
|---|---|---|
| .. | ||
| admin/assets/javascripts | ||
| app | ||
| assets | ||
| config | ||
| db/migrate | ||
| lib | ||
| spec | ||
| test/javascripts/integration/components | ||
| package.json | ||
| plugin.rb | ||
| tsconfig.json | ||