aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/multibyte
diff options
context:
space:
mode:
authorBeau Harrington <bohford@gmail.com>2009-09-09 22:25:23 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-09-10 17:36:54 -0700
commit38d65b03d6634b6993427213933aaa413a20c415 (patch)
treeb56a76480f99046991340cd5823bda7ea6228ca9 /activesupport/lib/active_support/multibyte
parentaf5b12c64c878f08336d38e91cc64137a30fb8da (diff)
downloadrails-38d65b03d6634b6993427213933aaa413a20c415.tar.gz
rails-38d65b03d6634b6993427213933aaa413a20c415.tar.bz2
rails-38d65b03d6634b6993427213933aaa413a20c415.zip
Remove redundant checks for valid character regexp in ActiveSupport::Multibyte#clean and #verify.
[#3181 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activesupport/lib/active_support/multibyte')
-rw-r--r--activesupport/lib/active_support/multibyte/utils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/multibyte/utils.rb b/activesupport/lib/active_support/multibyte/utils.rb
index acef84da91..a7e40688de 100644
--- a/activesupport/lib/active_support/multibyte/utils.rb
+++ b/activesupport/lib/active_support/multibyte/utils.rb
@@ -27,7 +27,7 @@ module ActiveSupport #:nodoc:
def self.verify(string)
if expression = valid_character
for c in string.split(//)
- return false unless valid_character.match(c)
+ return false unless expression.match(c)
end
end
true
@@ -50,7 +50,7 @@ module ActiveSupport #:nodoc:
def self.clean(string)
if expression = valid_character
stripped = []; for c in string.split(//)
- stripped << c if valid_character.match(c)
+ stripped << c if expression.match(c)
end; stripped.join
else
string