summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index a739850ff6..54a0c0d2a9 100644
--- a/parse.c
+++ b/parse.c
@@ -4696,6 +4696,9 @@ yyerrhandle:
#include <sys/types.h>
#include "regex.h"
#include "util.h"
+#ifndef strdup
+char *strdup();
+#endif
#define is_identchar(c) (((int)(c))!=-1&&(ISALNUM(c) || (c) == '_' || ismbchar(c)))
@@ -4840,7 +4843,6 @@ rb_compile_file(f, file, start)
return yycompile(strdup(f));
}
-
static int
nextc()
{
@@ -7255,7 +7257,7 @@ top_local_setup()
int i;
if (len > 0) {
- i = lvtbl->tbl[0];
+ i = ruby_scope->local_tbl?ruby_scope->local_tbl[0]:0;
if (i < len) {
if (i == 0 || ruby_scope->flag == SCOPE_ALLOCA) {