mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Remove unnecessary local variable
newline is always "\n" when it is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8952525a8e
commit
8415df619e
1 changed files with 4 additions and 5 deletions
9
parse.y
9
parse.y
|
@ -4666,7 +4666,7 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
|
||||||
const int max_line_margin = 30;
|
const int max_line_margin = 30;
|
||||||
const char *ptr, *ptr_end, *pt, *pb;
|
const char *ptr, *ptr_end, *pt, *pb;
|
||||||
const char *pre = "", *post = "", *pend;
|
const char *pre = "", *post = "", *pend;
|
||||||
const char *code = "", *caret = "", *newline = "";
|
const char *code = "", *caret = "";
|
||||||
const char *lim;
|
const char *lim;
|
||||||
char *buf;
|
char *buf;
|
||||||
long len;
|
long len;
|
||||||
|
@ -4757,10 +4757,9 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
|
||||||
p2 += (lim - ptr);
|
p2 += (lim - ptr);
|
||||||
}
|
}
|
||||||
*p2 = '\0';
|
*p2 = '\0';
|
||||||
newline = "\n";
|
compile_error(p, "%s\n""%s%.*s%s\n""%s%s",
|
||||||
compile_error(p, "%s%s""%s%.*s%s%s""%s%s",
|
msg,
|
||||||
msg, newline,
|
pre, (int)len, code, post,
|
||||||
pre, (int)len, code, post, newline,
|
|
||||||
pre, caret);
|
pre, caret);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue