commit
f39ec6676a
@ -17,9 +17,8 @@ def squish
|
||||
# str.squish! # => "foo bar boo"
|
||||
# str # => "foo bar boo"
|
||||
def squish!
|
||||
gsub!(/\A[[:space:]]+/, '')
|
||||
gsub!(/[[:space:]]+\z/, '')
|
||||
gsub!(/[[:space:]]+/, ' ')
|
||||
strip!
|
||||
self
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user