Emulating int64 overflows in Ruby
问题 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