summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--parse.y3
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cc38945..ac466de1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@ Sun Aug 6 20:40:41 2006 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (str[fp]time): %[EO]U didn't denote %U.
+Sat Aug 5 17:07:43 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * parse.y (top_local_setup): local_vars[-1] should point
+ ruby_scope itself to protect local_tbl from garbage collection.
+ [ruby-dev:29049]
+
Sat Aug 5 13:54:03 2006 Tadayoshi Funaba <tadf@dotrb.org>
* lib/date/format.rb (str[fp]time): "%\n" means "\n".
diff --git a/parse.y b/parse.y
index 85f054b..097a4c7 100644
--- a/parse.y
+++ b/parse.y
@@ -5717,7 +5717,7 @@ top_local_setup()
rb_mem_clear(vars+i, len-i);
}
else {
- *vars++ = 0;
+ *vars++ = (VALUE)ruby_scope;
rb_mem_clear(vars, len);
}
ruby_scope->local_vars = vars;
@@ -5732,7 +5732,6 @@ top_local_setup()
if (ruby_scope->local_tbl && ruby_scope->local_vars[-1] == 0) {
xfree(ruby_scope->local_tbl);
}
- ruby_scope->local_vars[-1] = 0;
ruby_scope->local_tbl = local_tbl();
}
}