ruby implementation of bob