Array#dup isn’t necessary here.
You can always make things simpler.