Removing extraneous characters from ruby example