Ruby solutions for small tasks