implement Array comparisons by Ruby
implement part of Array#<=> in C