When triggering a call to method_missing on a Rails server running in development mode, it dies with a StackOverflowError
. This is a Rails5 on JRuby environment. We are not using multi-threading here.
The behavior can be summarized as follows:
def method_missing
and raising from there results in correct behavior (e.g. fail 'oh noes.'
will print the expected error).method_missing
implemented will result in a StackOverflowError
again.debugger
right above super
works and typing next
reveals that the following calls are:
gems/actionpack-5.0.1.rc2/lib/action_controller/metal/rescue.rb:22
request.env['action_dispatch.show_detailed_exceptions'] ||= show_detailed_exceptions?
gems/actionpack-5.0.1.rc2/lib/action_controller/metal/rescue.rb:23
rescue_with_handler(exception) || raise
backtrace
or info stack
will result in a StackOverflow.We saw that some code was removed in Rails in this commit. Indeed, putting the deleted code back in (for testing purposes only) resolves the problem.
Do you think this is a rails bug?
Possibly solved in https://github.com/rails/rails/issues/27481. Seems like a jruby bug.