diff --git a/string_distance.lua b/string_distance.lua index 7845bf3..629fa64 100644 --- a/string_distance.lua +++ b/string_distance.lua @@ -177,7 +177,8 @@ local function strings_with_highest_similarity (str, list_of_other_str) if type(str) ~= 'string' then error(('[errors/internal]: Bad argument #1, expected string, got %s (%s)'):format(str, type(str))) end if type(list_of_other_str) ~= 'table' then error(('[errors/internal]: Bad argument #2, expected table, got %s (%s)'):format(list_of_other_str, type(list_of_other_str))) end for i = 1, #list_of_other_str do - if type(list_of_other_str[i]) ~= 'string' then error(('[errors/internal]: Bad argument #2, expected sequence of strings, but got %s (%s) on index %i'):format(list_of_other_str[i], type(list_of_other_str[i]), i)) end + list_of_other_str[i] = tostring(list_of_other_str[i]) + --if type(list_of_other_str[i]) ~= 'string' then error(('[errors/internal]: Bad argument #2, expected sequence of strings, but got %s (%s) on index %i in sequence'):format(list_of_other_str[i], type(list_of_other_str[i]), i)) end end -- Do work