Oh, and if people really care about radix, it would be better to have a radix function that returns the radix (i.e. 8, 10 or 16). Not sure why though - detailed error messages perhaps, but could just check with is_integer and give an error "is not a valid decimal, octal or hex integer value". If it is for checking the format for assignment to attributes in resources... then the concept is flawed since any arithmetic creates a Ruby Numeric and they have no radix, and the result is a decimal string. I.e. users do need to convert to string using sprintf and specifying the radix if the result should be guaranteed to contain a number in a certain form in all cases.