sad_panda
sad_panda copied to clipboard
Modernize ruby/bundler versions
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.