ruby maths