Dealing with a LocalJumpError

Public, Troubleshooting, Ruby General

harrylevine

Created: Jun 20, 2016     Updated: Jun 20, 2016


This is commonly caused by having return called within a block.

Here is an example. This example triggered an Airbrake error of type LocalJumpError:

Here is the refactored code that removes the return call within the block: