def patterns inside heredoc blocks are incorrectly recognized as method definitions.
text = <<EOT
Lorem ipsum
def x(a: String)
Dolor sit amet
EOT
In the above code, the text def x(a: String) inside the heredoc is being parsed as a method definition.
Text inside heredoc blocks should be skipped during parsing.