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:
parent
30034dfbc4
commit
3f11253af0
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class String
|
||||||
# Performs a destructive squish. See String#squish.
|
# Performs a destructive squish. See String#squish.
|
||||||
def squish!
|
def squish!
|
||||||
gsub!(/\A[[:space:]]+/, '')
|
gsub!(/\A[[:space:]]+/, '')
|
||||||
gsub!(/[[:space:]]+\Z/, '')
|
gsub!(/[[:space:]]+\z/, '')
|
||||||
gsub!(/[[:space:]]+/, ' ')
|
gsub!(/[[:space:]]+/, ' ')
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue