Closed tzvetkoff closed 9 years ago
Yes, the reason for this is that the characters cfhistuCFHISTU
is removed from any alphabet before it is used. (Turns your example into: 0123456789abde
)
The error message is a bit misleading.
I’ll update the code when I have verified the expected behaviour with @ivanakimov
I have now made the change (d48b8b650) and pushed 1.0.1 to RubyGems.
Thank you for reporting the issue.
The following piece of code:
raises a
Hashids::AlphabetError
with messageAlphabet must contain at least 16 unique characters.
The
validate_alphabet
call needs to be moved after@alphabet
assignment.