Change class evaluation for Rationals in cast_value