Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #7586] Fix infinite loop in FrozenStringLiteralComment
It was detecting frozen_string_literal in the first three lines of the file, while there's no guideline to separate magic comments with newlines. If shebang and encoding were separated by a newline, that was three lines already, and frozen_string_literal was added on line 4, and not detected as such after auto-correction, triggering an infinite loop.
- Loading branch information
Showing
3 changed files
with
14 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters