Added security checks to the Ruby code generator.