fix a security issue in ruby extension