1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

no need for \Z, \z is more concise

This commit is contained in:
Xavier Noria 2013-01-28 22:27:31 +01:00
parent 30034dfbc4
commit 3f11253af0

View file

@ -15,7 +15,7 @@ class String
# Performs a destructive squish. See String#squish.
def squish!
gsub!(/\A[[:space:]]+/, '')
gsub!(/[[:space:]]+\Z/, '')
gsub!(/[[:space:]]+\z/, '')
gsub!(/[[:space:]]+/, ' ')
self
end