fixed printing of infinity in ruby