issues
search
jmcnevin
/
rubypants
RubyPants: SmartyPants for Ruby
Other
29
stars
20
forks
source link
Reduce regex initializations
#20
Closed
ashmaroli
closed
6 years ago
ashmaroli
commented
6 years ago
assigning regexes to a constant helps in reducing regex initializations and expresses their intent better
String#gsub!
with a string match is faster than
String#gsub!
with a regex match
agriffis
commented
6 years ago
Looks good, thanks!
String#gsub!
with a string match is faster thanString#gsub!
with a regex match