[feature] fix some old API for ruby extension