calc for ruby