Skip to content

Fix Ruby warning: character class has duplicated range #1913

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

Merged
merged 1 commit into from
Nov 14, 2017

Conversation

mattbrictson
Copy link
Contributor

When running the specs in master, I see the following warning printed:

lib/rspec/rails/example/system_example_group.rb:52: warning: character class has duplicated range: /[\n\s]+/

This PR fixes the warning by simplifying the offending regex to remove the redundant \n.

@JonRowe JonRowe merged commit e7b9103 into rspec:master Nov 14, 2017
@JonRowe
Copy link
Member

JonRowe commented Nov 14, 2017

Thanks, I wasn't aware \s now matched new lines.

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.

2 participants