Permalink
Browse files

minor clean up on unnecessary variable

  • Loading branch information...
1 parent e56a3e9 commit 8cef99b3c9c8996c8b4fe520518b19e669ead7c3 Thomas Pun committed Mar 12, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 luhn_filter.rb
View
@@ -40,11 +40,10 @@ def filtered
unsanitized = matched[0] # actual matched string
digits_only = unsanitized.remove_non_digits
if digits_only.luhn_check?
- masked = unsanitized.mask_digits 'X'
# MatchData#offset gives you the range of the first appearance of
# matched data to the first non matched
matched_range = matched.offset(0).first .. (matched.offset(0).last-1)
- @filtered[matched_range] = masked
+ @filtered[matched_range] = unsanitized.mask_digits 'X'
end
start += 1
end

0 comments on commit 8cef99b

Please sign in to comment.