ruby cleanups

thanks to @warmwaffles for review