From 98e5eb6f394562b7bdae830424eda43f6b5f22f7 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 5 Sep 2014 04:52:24 +0000 Subject: merge revision(s) 47090: [Backport #10114] * 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/branches/ruby_2_0_0@47402 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 1ec06a3431..7da5e1e269 100644 --- a/parse.y +++ b/parse.y @@ -5246,7 +5246,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