From 2bd1ae1e671822b8222c64c3e0d7241420330537 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 6 Aug 2014 21:04:52 +0000 Subject: parse.y: preserve encoding * parse.y (parser_yyerror): preserve source code encoding in syntax error messages. [ruby-core:64228] [Bug #10114] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 967972a029..0ac8ea6890 100644 --- a/parse.y +++ b/parse.y @@ -5261,7 +5261,7 @@ parser_yyerror(struct parser_params *parser, const char *msg) buf = ALLOCA_N(char, len+2); MEMCPY(buf, p, char, len); buf[len] = '\0'; - rb_compile_error_append("%s%s%s", pre, buf, post); + rb_compile_error_with_enc(NULL, 0, (void *)current_enc, "%s%s%s", pre, buf, post); i = (int)(lex_p - p); p2 = buf; pe = buf + len; -- cgit v1.2.3