From 3f11253af0c7ad6cd67d44b50a0bca9fa8d69e08 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 28 Jan 2013 22:27:31 +0100 Subject: no need for \Z, \z is more concise --- activesupport/lib/active_support/core_ext/string/filters.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3