Replace "check(newString)" by "finalString = check(newString)"
(line 33). Or get rid of "return finalString" (line 37).

What's the advantage of toBase36, compared to the built-in
to_s(36)?

 p toBase36(30)
 p 30.to_s(36)

gegroet,
Erik V. - http://www.erikveen.dds.nl/