Add #to_i and fix parsing for integer-only strings