Ruby

Ruby

Made by DeepSource

Invalid order of method invocation in heredoc RB-LI1026

Bug risk
Major
Autofix

Methods on a heredoc should be invoked at beginning, not at the end.

Bad practice

x = <<-DOC
  This is awesome.
DOC
.trim

Recommended

x = <<-DOC.trim
  This is awesome.
DOC