Module: Brakeman::ErubisPatch

Included in:
Rails2XSSPluginErubis, Rails3Erubis, ScannerErubis
Defined in:
lib/brakeman/parsers/erubis_patch.rb

Instance Method Summary collapse

Instance Method Details

#convert(input) ⇒ Object

Simple patch to make ‘erubis` compatible with frozen string literals



3
4
5
6
7
8
9
10
# File 'lib/brakeman/parsers/erubis_patch.rb', line 3

def convert(input)
  codebuf = +"" # Modified line, the rest is identitical
  @preamble.nil? ? add_preamble(codebuf) : (@preamble && (codebuf << @preamble))
  convert_input(codebuf, input)
  @postamble.nil? ? add_postamble(codebuf) : (@postamble && (codebuf << @postamble))
  @_proc = nil    # clear cached proc object
  return codebuf  # or codebuf.join()
end