8000 Modernize ruby/bundler versions by drusepth · Pull Request #5 · mattThousand/sad_panda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Modernize ruby/bundler versions #5

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

drusepth
Copy link
@drusepth drusepth commented Feb 5, 2021

I'm not sure what Ruby version this broke on, but trying to run it on 2.7.2 gave a syntax error for the fixed regex (because it treated - within the regex as a range identifier, instead of the literal -).

This PR moves the - to the end of the char-class (just swapping positions with the _ character next to it) and also updates ruby/bundler to more modern versions.

This was the error I got when trying to use the gem in a modern project:

Syntax Error: unmatched range specifier in char-class: 
                  /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=\\+\\$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\\+\\$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[\\+~%\\/.\\w-_]*)?\\??(?:[-\\+=&;%@.\\w_]*)#?(?:[\\w]*))?)/ (SyntaxError)

After this fix, tests now pass and things seem to work as expected.

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.

1 participant
0