зеркало из https://github.com/github/ruby.git
fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
89b3281668
Коммит
2fd34fa328
|
@ -8,7 +8,7 @@ Thu Dec 24 18:43:19 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
(rb_compile_bug): deprecate internal functions.
|
||||
|
||||
* parse.y (parser_yyerror): construct exception message with
|
||||
source code and carret.
|
||||
source code and caret.
|
||||
|
||||
Thu Dec 24 17:25:42 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
|
|
6
parse.y
6
parse.y
|
@ -5410,7 +5410,7 @@ parser_yyerror(struct parser_params *parser, const char *msg)
|
|||
const int max_line_margin = 30;
|
||||
const char *p, *pe;
|
||||
const char *pre = "", *post = "";
|
||||
const char *code = "", *carret = "", *newline = "";
|
||||
const char *code = "", *caret = "", *newline = "";
|
||||
char *buf;
|
||||
long len;
|
||||
int i;
|
||||
|
@ -5446,7 +5446,7 @@ parser_yyerror(struct parser_params *parser, const char *msg)
|
|||
i = (int)(lex_p - p);
|
||||
buf = ALLOCA_N(char, i+2);
|
||||
code = p;
|
||||
carret = p2 = buf;
|
||||
caret = p2 = buf;
|
||||
while (i-- > 0) {
|
||||
*p2++ = *p++ == '\t' ? '\t' : ' ';
|
||||
}
|
||||
|
@ -5460,7 +5460,7 @@ parser_yyerror(struct parser_params *parser, const char *msg)
|
|||
compile_error(PARSER_ARG "%s%s""%s%.*s%s%s""%s%s",
|
||||
msg, newline,
|
||||
pre, (int)len, code, post, newline,
|
||||
pre, carret);
|
||||
pre, caret);
|
||||
#else
|
||||
dispatch1(parse_error, STR_NEW2(msg));
|
||||
ripper_error();
|
||||
|
|
Загрузка…
Ссылка в новой задаче