Permalink
Browse files

Remove redundant checks for valid character regexp in ActiveSupport::…

…Multibyte#clean and #verify.

[#3181 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information...
1 parent af5b12c commit 38d65b03d6634b6993427213933aaa413a20c415 @bohford bohford committed with jeremy Sep 10, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/multibyte/utils.rb
@@ -27,7 +27,7 @@ def self.verify(string)
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 @@ def self.clean(string)
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

0 comments on commit 38d65b0

Please sign in to comment.