This commit is contained in:
Pete Matsyburka
2025-03-05 18:07:38 +02:00
parent bc1d5a9825
commit 3f872da435
+1 -1
View File
@@ -16,7 +16,7 @@ module TextUtils
end
def mask_value(text, unmask_size = 0)
if unmask_size.is_a?(Numeric) && !unmask_size.zero?
if unmask_size.is_a?(Numeric) && !unmask_size.zero? && unmask_size.abs < text.length
if unmask_size.negative?
[
text.first(text.length + unmask_size).gsub(MASK_REGEXP, MASK_SYMBOL),