ruby: use stdint instead of assumptions