aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-01-28 22:27:31 +0100
committerXavier Noria <fxn@hashref.com>2013-01-28 22:27:37 +0100
commit3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08 (patch)
treeced7e73a21e8560c402d0bd5661ce87e090985b8
parent30034dfbc4beda97fb182fa9bda317a7c3b6615d (diff)
downloadrails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.tar.gz
rails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.tar.bz2
rails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.zip
no need for \Z, \z is more concise
-rw-r--r--activesupport/lib/active_support/core_ext/string/filters.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/filters.rb b/activesupport/lib/active_support/core_ext/string/filters.rb
index 1811f9f861..a1b3f79748 100644
--- a/activesupport/lib/active_support/core_ext/string/filters.rb
+++ b/activesupport/lib/active_support/core_ext/string/filters.rb
@@ -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