Skip to content

Instantly share code, notes, and snippets.

@scicco
Last active December 11, 2015 13:34
Show Gist options
  • Save scicco/fa124d6261b87d26c809 to your computer and use it in GitHub Desktop.
Save scicco/fa124d6261b87d26c809 to your computer and use it in GitHub Desktop.
debug stack level too deep error in ruby
# found here:
# http://stackoverflow.com/a/28680027/1488217
set_trace_func proc {
|event, file, line, id, binding, classname|
if event == "call" && caller_locations.length > 500
fail "stack level too deep"
end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment