I'm a long time programmer but new to Ruby. I'm trying to port an algorithm called CheckRevision used for checking integrity of game files before loggin into Battle.net's online gaming service.

The algorithm makes a "hash" of the files with a given formula. Without boring details, it's constantly modifying the values `a`, `b` and `c` which are 64-bit integers, or in the reference implementation I'm porting from, a Java `long`. My implementation is correct for the first few iterations but when the int64 should wrap around it becomes a BigNum instead.

What's the proper way to restrict a FixNum to 64bit, or should I be using a different type?