/* * call-seq: * dvector.values_at(selector,... ) -> a_dvector * * Returns a new vector containing the elements in * _dvector_ corresponding to the given selector(s). The selectors * may be either integer indices or ranges. * * a = Dvector[ 1, 2, 3, 4, 5, 6 ] * a.values_at(1, 3, 5) -> Dvector[ 2, 4, 6 ] * a.values_at(1, 3, 5, 7) -> Dvector[ 2, 4, 6 ] * a.values_at(-1, -3, -5, -7) -> Dvector[ 6, 4, 2 ] * a.values_at(1..3, 2...5) -> Dvector[ 2, 3, 4, 3, 4, 5 ] */ VALUE dvector_values_at(int argc, VALUE *argv, VALUE ary) {