basics/heredoc_with_args.rb

tests/_examples/basics/heredoc_with_args.rb in the metorex repository.

def pair(a, b)
  "#{a}|#{b}"
end

puts pair(<<-EOS, "second")
first line
second line
EOS

x = <<-TXT + " world"
hello
TXT
puts x

Output:

first line
second line
|second
hello
 world