I'm not 100% sure what you mean by DRY here, but I'll concede my code is only elegant from the perspective of the programmer not wanting to rewrite already written code rather than future readers. Now
OTOH? That's what I'm talking about! One added line, understandable at first glance and I've learnt a new construct. I'm also pleased to have learnt about hash slices of course but kind of overkill for solving this specific problem.