Skip to content

Commit

Permalink
Remove redundant checks for valid character regexp in ActiveSupport::…
Browse files Browse the repository at this point in the history
…Multibyte#clean and #verify.

[#3181 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
  • Loading branch information
bohford authored and jeremy committed Sep 11, 2009
1 parent e1b1096 commit a32eeeb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions activesupport/lib/active_support/multibyte/utils.rb
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a32eeeb

Please sign in to comment.