mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
868d104b49
commit
8473a82934
2 changed files with 10 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Fri May 10 19:00:47 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
|
* parse.y (here_document): preserve line number begins here
|
||||||
|
document.
|
||||||
|
|
||||||
Fri May 10 01:55:44 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Fri May 10 01:55:44 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* eval.c (rb_thread_join): added an argument to limit time to wait
|
* eval.c (rb_thread_join): added an argument to limit time to wait
|
||||||
|
|
6
parse.y
6
parse.y
|
@ -2877,6 +2877,10 @@ here_document(term, indent)
|
||||||
int offset_save;
|
int offset_save;
|
||||||
NODE *list = 0;
|
NODE *list = 0;
|
||||||
int linesave = ruby_sourceline;
|
int linesave = ruby_sourceline;
|
||||||
|
int firstline;
|
||||||
|
|
||||||
|
if (heredoc_end > 0) ruby_sourceline = heredoc_end;
|
||||||
|
firstline = ruby_sourceline;
|
||||||
|
|
||||||
newtok();
|
newtok();
|
||||||
switch (term) {
|
switch (term) {
|
||||||
|
@ -2978,7 +2982,7 @@ here_document(term, indent)
|
||||||
ruby_sourceline = linesave;
|
ruby_sourceline = linesave;
|
||||||
|
|
||||||
if (list) {
|
if (list) {
|
||||||
nd_set_line(list, linesave+1);
|
nd_set_line(list, firstline+1);
|
||||||
yylval.node = list;
|
yylval.node = list;
|
||||||
}
|
}
|
||||||
switch (term) {
|
switch (term) {
|
||||||
|
|
Loading…
Reference in a new issue