Fix exception raised from template should not show compiled code
Created by: nikhilbhatt
Motivation / Background
This Pull Request has been created because #51090
Detail
This Pull Request changes activesupport/lib/active_support/core_ext/erb/util.rb
Additional information
- In this tokenize method we are not handling the text present after
%>
- Updated that method to handle text present at end.
Checklist
Before submitting the PR make sure the following are checked:
-
This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs. -
Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
-
Tests are added or updated if you fix a bug or add a feature. -
CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.