summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--parse.y4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index f0cc8d5c2e6..72818c93a18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jun 22 19:57:33 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (shadowing_lvar_gen): should add lvar to vars and
+ used. [ruby-dev:41666]
+
Tue Jun 22 13:23:13 2010 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/delegate.rb: Forward #trust, #untrust, #taint and #untaint
diff --git a/parse.y b/parse.y
index 9969092e18b..b9f59d4a9c3 100644
--- a/parse.y
+++ b/parse.y
@@ -8236,6 +8236,10 @@ shadowing_lvar_gen(struct parser_params *parser, ID name)
}
else if (dvar_defined(name) || local_id(name)) {
rb_warningS("shadowing outer local variable - %s", rb_id2name(name));
+ vtable_add(lvtbl->vars, name);
+ if (lvtbl->used) {
+ vtable_add(lvtbl->used, name);
+ }
}
}
else {