diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-05-10 10:05:30 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-05-10 10:05:30 +0000 |
commit | 8473a8293457ab60679bee0aaa44fc4fae945224 (patch) | |
tree | 91a3f40f2551b0fb52ed92c9367b7e68085efe63 /parse.y | |
parent | 868d104b49438c3e476c4e39c2f105ac47c2b56f (diff) | |
download | ruby-8473a8293457ab60679bee0aaa44fc4fae945224.tar.gz |
* parse.y (here_document): preserve line number begins here
document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -2877,6 +2877,10 @@ here_document(term, indent) int offset_save; NODE *list = 0; int linesave = ruby_sourceline; + int firstline; + + if (heredoc_end > 0) ruby_sourceline = heredoc_end; + firstline = ruby_sourceline; newtok(); switch (term) { @@ -2978,7 +2982,7 @@ here_document(term, indent) ruby_sourceline = linesave; if (list) { - nd_set_line(list, linesave+1); + nd_set_line(list, firstline+1); yylval.node = list; } switch (term) { |