Constant time string comparison in ruby