diff options
author | Xavier Noria <fxn@hashref.com> | 2013-01-28 22:27:31 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-01-28 22:27:37 +0100 |
commit | 3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08 (patch) | |
tree | ced7e73a21e8560c402d0bd5661ce87e090985b8 /activesupport/lib/active_support | |
parent | 30034dfbc4beda97fb182fa9bda317a7c3b6615d (diff) | |
download | rails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.tar.gz rails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.tar.bz2 rails-3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08.zip |
no need for \Z, \z is more concise
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/filters.rb | 2 |
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 |