diff options
| -rw-r--r-- | src/parse.y | 4 | ||||
| -rw-r--r-- | tasks/ruby_ext.rake | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y index 3b69601b1..35bc18cd5 100644 --- a/src/parse.y +++ b/src/parse.y @@ -4726,6 +4726,10 @@ parser_yylex(parser_state *p) p->lstate = EXPR_END; token_column = newtok(p); c = nextc(p); + if (c == -1) { + yyerror(p, "incomplete global variable syntax"); + return 0; + } switch (c) { case '_': /* $_: last read line string */ c = nextc(p); diff --git a/tasks/ruby_ext.rake b/tasks/ruby_ext.rake index a0fbe7b72..0a0883e02 100644 --- a/tasks/ruby_ext.rake +++ b/tasks/ruby_ext.rake @@ -45,7 +45,7 @@ end $pp_show = true if $verbose.nil? - unless Rake.verbose.nil? + if Rake.respond_to?(:verbose) && !Rake.verbose.nil? if Rake.verbose.class == TrueClass # verbose message logging $pp_show = false |
