The goal here is to validate the stringed decimal value provided is a valid octal number, not just convertible to an integer.  Integer(value, 8) does not appear to take a base as an option, I am getting an invalid number of arguments exception.  The to_i method on a string will not alert to an invalid octal number, it just drops it, so the regex captures that error where as to_i just ignores it. Since umask is restricted to 1 - 4 digits we also want to validate that, say, a 5 digit number wasn't entered.  I also like the specificity of my error :)