Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape hyphen in already correctly working regex to fix warning #1343

Merged

Conversation

trichoplax
Copy link
Contributor

When running rails s to serve a local development instance, a warning is given:

warning: character class has '-' without escape: /[a-z0-9-.]+\.ngrok\-free\.app/

Nothing is broken. Ruby understands that the third hyphen inside the square brackets is a literal hyphen, not a range indicator. The regex already matches exactly what it should. The only problem is the warning, causing clutter in the terminal.

This pull request escapes the hyphen in order to fix the warning. There is no change to functionality.

@cellio cellio requested a review from a team May 27, 2024 15:07
@ArtOfCode- ArtOfCode- merged commit a653bc2 into develop Jul 8, 2024
1 of 6 checks passed
@ArtOfCode- ArtOfCode- deleted the trichoplax/fix-development-unescaped-hyphen-warning branch July 8, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants