Ruby midterm test