summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-10 07:14:44 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-10 07:14:44 +0000
commitbcd3f7863757d75a7bd232e442fed038e0fdcff5 (patch)
tree8e3ebc82c81eb34f15917ed7756bc2ab07540b8c /variable.c
parent21aef91673bb6b2a7f3025b3c79c5f097a262131 (diff)
merge revision(s) 55182: [Backport #12389]
* variable.c (rb_local_constants_i): exclude hidden constants. [ruby-core:75575] [Bug #12389] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/variable.c b/variable.c
index 5b0b5d8e89..2c85ae155d 100644
--- a/variable.c
+++ b/variable.c
@@ -1999,7 +1999,9 @@ sv_i(st_data_t k, st_data_t v, st_data_t a)
static int
rb_local_constants_i(st_data_t const_name, st_data_t const_value, st_data_t ary)
{
- rb_ary_push((VALUE)ary, ID2SYM((ID)const_name));
+ if (rb_is_const_id(const_name)) {
+ rb_ary_push((VALUE)ary, ID2SYM((ID)const_name));
+ }
return ST_CONTINUE;
}