Ruby example: bug fixed