mirror of
https://github.com/github/rails.git
synced 2026-01-14 00:57:58 -05:00
Regexps have a construct to express alternation of characters, which is character classes. In addition to being the most specific idiom to write this pattern, it reads better without the backslashes. Also, it is better not to use a capture if none is needed. As a side-effect of these changes, the gsub is marginally faster, but speed is not the point of this commit.