Influence of Ru substitution on magnetic properties of Y2Fe17 and Y2Co17 (hexagonal structure of the Th2Ni17-type) has been studied on single-crystalline samples. Whereas in the Y2Fe17-xRux system ferromagnetism is transformed rapidly into antiferromagnetism with a field-induced metamagnetic transition, in Y2Co17-xRux only a monotonous decrease of spontaneous magnetic moment, Curie temperature and first anisotropy constant is observed.