title: How to close a Ruby Heredoc with string-interpolated identifier
body: <p>Within the context of IRB, I'm exploring Ruby's Heredoc functionality and attempted to use string interpolation inside the <strong>identifier</strong>, <em>not</em> inside the Heredoc itself. The problem is that when I try to close the Heredoc, I am unable to do so and must CTRL+D to force quit.</p>
  
  <p>No matter what I type to close the Heredoc, IRB thinks I am still typing new lines inside the Heredoc.</p>
  
  <pre><code>irb(main):001:0&gt; identifier = "EOF"
  irb(main):002:0&gt; &lt;&lt;"#{identifier}"
  irb(main):003:0" "#{identifier}"
  irb(main):004:0" #{identifier}
  irb(main):005:0" "EOF"
  irb(main):006:0" EOF
  irb(main):007:0" 
  </code></pre>
  
  <p>Is it possible to close this Heredoc, and if so, what is IRB expecting?</p>