From: "Aleksi Niemelä" Date: 2000-07-03T21:41:07+02:00 Subject: [ruby-talk:03774] Ruby needs \n for last line in here-doc The file with content "puts 'foo'" (without \n as a last character) goes through Ruby well. The file with content "puts <<-EOS\nfoo\nEOS" (without \n as a last character) doesn't; it reports: \src\eol2.rb:3: unterminated string meets end of file \src\eol2.rb:1: can't find string "EOS" anywhere before EOF The file with "puts <<-EOS\nfoo\nEOS\n" goes fine. Ok? If not, maybe one could apply this patch (just coded, not tested because I can't compile on this machine): --- parse.y Sun Jul 02 21:46:22 2000 +++ parse.y.here_patched Mon Jul 03 22:02:45 2000 @@ -2617,7 +2617,8 @@ p++; } } - if (strncmp(eos, p, len) == 0 && (p[len] == '\n' || p[len] == '\r')) { + if (strncmp(eos, p, len) == 0 && + (p[len] == '\n' || p[len] == '\r') || p[len] == 0)) { break; } - Aleksi