add test function for ruby