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

Fix ambiguous 1st argument warnings in Ruby 2.3.x #1075

Merged

Conversation

stevecj
Copy link
Contributor

@stevecj stevecj commented Jun 26, 2016

Having a first argument to a method call without parentheses in Ruby 2.3.x that is a "/" delimited regular expression literal results in…

warning: ambiguous first argument; put parentheses or a space even after `/' operator

This can be fixed by either using parentheses around the arguments or using the alternative syntax for literal regular expressions. It seems cleanest to me to use the alternative syntax rather than adding the parentheses when similar nearby code lines all do not use the parentheses.

@alexreisner alexreisner merged commit 4315739 into alexreisner:master Jun 27, 2016
@alexreisner
Copy link
Owner

Thanks!

@stevecj stevecj deleted the fix-ambiguous-1st-arg-warnings branch June 27, 2016 15:38
zacviandier pushed a commit to teezily/geocoder that referenced this pull request Feb 9, 2018
…g-warnings

Fix ambiguous 1st argument warnings in Ruby 2.3.x
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