Is there a possibility of `code` being nil? If not, you can probably just do `@code = code.upcase`