ChatGPT - Ruby Function: Missing Digit