Added bare ruby implementation