summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 01:24:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 01:24:15 +0000
commit76b609c8c3d4cae09e619aeee6ee5743a498fd3d (patch)
tree4062a80baabb5bfc07133927050338956f72e679
parentc151679cc3fba31952109b39747efc7aa66b57fa (diff)
parse.y (yycompile0): check if accepted
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 006f768c34..feabdc42e8 100644
--- a/parse.y
+++ b/parse.y
@@ -4758,7 +4758,7 @@ yycompile0(VALUE arg)
RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \
}
RUBY_DTRACE_PARSE_HOOK(BEGIN);
- n = yyparse((void*)p);
+ n = yyparse(p);
RUBY_DTRACE_PARSE_HOOK(END);
p->debug_lines = 0;
p->coverage = 0;
@@ -4766,7 +4766,7 @@ yycompile0(VALUE arg)
p->lex.strterm = 0;
p->lex.pcur = p->lex.pbeg = p->lex.pend = 0;
p->lex.prevline = p->lex.lastline = p->lex.nextline = 0;
- if (p->error_p) {
+ if (n || p->error_p) {
VALUE mesg = p->error_buffer;
if (!mesg) {
mesg = rb_class_new_instance(0, 0, rb_eSyntaxError);