Cross-project defect prediction (CPDP) has recently become very popular in the field of software defect prediction. It was generally treated as a binary classification problem or a regression problem in most of previous studies. However, these existing CPDP methods may be not suitable for those software projects that have limited manpower and budget. To address the issue of priority estimation for buggy software entities, in this paper CPDP is formulated as a ranking problem. Inspired by the idea of the pointwise approach to learning to rank, we propose a ranking-oriented CPDP approach called ROCPDP. A case study conducted on the datasets collected from AEEEM and PROMISE shows that ROCPDP outperforms the eight baseline methods in two CPDP scenarios, namely one-to-one and many-to-one. Besides, in the many-to-one scenario ROCPDP is, by and large, comparable to the best baseline method performed in a specific within-project defect prediction scenario.