Question from the Ruby test

How to get the first 3 elements of an array in Ruby