You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While those PRs address a failure to identify the source location in a template with spaces in front of the errant method, characters afterward can still cause DebugExceptions to error.
Steps to reproduce
Modify actionview/test/fixtures/test/unparseable_runtime_error.html.erb to:
<% iftrue %>
<%= method_that_does_not_exist %>a
<% end %>
Note the added a at the end of the middle line. It seems a variety of characters (possibly all) in that location will cause the issue.
Expected behavior
DebugExceptions renders its normal error page.
Actual behavior
A generic 500 error type exception page is rendered to the browser.
Debugging the cause for the error shows NoMethodError: undefined method bytesize' for nil:NilClass`.
This is an extension of #48173 and the resulting PRs #48184 and #48294.
While those PRs address a failure to identify the source location in a template with spaces in front of the errant method, characters afterward can still cause DebugExceptions to error.
Steps to reproduce
Modify
actionview/test/fixtures/test/unparseable_runtime_error.html.erb
to:Note the added
a
at the end of the middle line. It seems a variety of characters (possibly all) in that location will cause the issue.Expected behavior
DebugExceptions renders its normal error page.
Actual behavior
A generic 500 error type exception page is rendered to the browser.
Debugging the cause for the error shows
NoMethodError: undefined method
bytesize' for nil:NilClass`.Backtrace
System configuration
Rails version: main
Ruby version: 3.2.2
The text was updated successfully, but these errors were encountered: