Handle different Ruby versions