diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-13 01:44:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-13 01:44:34 +0000 |
commit | 8415df619ecfe9d869067faf1282f3552d18e578 (patch) | |
tree | 69e7390b60c9a15044bc45f177eef96de9491686 | |
parent | 8952525a8e688e0fe67bbc7a3c84256190a44c23 (diff) | |
download | ruby-8415df619ecfe9d869067faf1282f3552d18e578.tar.gz |
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
-rw-r--r-- | parse.y | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -4666,7 +4666,7 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg) const int max_line_margin = 30; const char *ptr, *ptr_end, *pt, *pb; const char *pre = "", *post = "", *pend; - const char *code = "", *caret = "", *newline = ""; + const char *code = "", *caret = ""; const char *lim; char *buf; long len; @@ -4757,10 +4757,9 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg) p2 += (lim - ptr); } *p2 = '\0'; - newline = "\n"; - compile_error(p, "%s%s""%s%.*s%s%s""%s%s", - msg, newline, - pre, (int)len, code, post, newline, + compile_error(p, "%s\n""%s%.*s%s\n""%s%s", + msg, + pre, (int)len, code, post, pre, caret); } #else |