practice with blocks in ruby

practice