From 3f606b9aca26a4730559db0021c2bfde667dc281 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 21 Jul 2010 06:00:25 +0000 Subject: [PATCH] * parse.y (local_push_gen): disable unused variable warnings in eval. [ruby-dev:41869] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ parse.y | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c4024b2191..7598f490f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 21 15:00:19 2010 Nobuyoshi Nakada + + * parse.y (local_push_gen): disable unused variable warnings in + eval. [ruby-dev:41869] + Wed Jul 21 13:57:37 2010 NARUSE, Yui * vm_method.c (rb_method_boundp): revert r28543, r28564. diff --git a/parse.y b/parse.y index 6b4bf956f0..3aeb8309c3 100644 --- a/parse.y +++ b/parse.y @@ -8950,7 +8950,7 @@ local_push_gen(struct parser_params *parser, int inherit_dvars) local->prev = lvtbl; local->args = vtable_alloc(0); local->vars = vtable_alloc(inherit_dvars ? DVARS_INHERIT : DVARS_TOPSCOPE); - local->used = RTEST(ruby_verbose) ? vtable_alloc(0) : 0; + local->used = !inherit_dvars && RTEST(ruby_verbose) ? vtable_alloc(0) : 0; lvtbl = local; }