class CodeRay::Scanners::Ruby::StringState

def initialize kind, interpreted, delim, heredoc = false

def initialize kind, interpreted, delim, heredoc = false
  if heredoc
    pattern = heredoc_pattern delim, interpreted, heredoc == :indented
    delim = nil
  else
    pattern = STRING_PATTERN[ [delim, interpreted] ]
    if closing_paren = CLOSING_PAREN[delim]
      opening_paren = delim
      delim = closing_paren
      paren_depth = 1
    end
  end
  super kind, interpreted, delim, heredoc, opening_paren, paren_depth, pattern, :initial
end