Q:

Finding elements repeating in many arrays in Rails

I have problem with comparing many arrays in one array. I need to get element which  exists in every array. It's look like this one:
array= [[11,12,13,14],[55,66,13],[13,15,17,22,34],[4,6,8,13]]

I need to get only: 13 - because its on every array, how to get it ?

A:

This should work
a.inject(:&)

