edit ruby encoding snippet