From caec808f74a7545cc2b6930dbfa629071315f065 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 16 Aug 2016 05:56:26 +0000 Subject: merge revision(s) 55705: [Backport #12345] * variable.c (rb_local_constants_i): exclude private constants when excluding inherited constants too. [Bug #12345] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@55930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- variable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'variable.c') diff --git a/variable.c b/variable.c index 2c85ae155d..1b875e543c 100644 --- a/variable.c +++ b/variable.c @@ -1999,7 +1999,7 @@ 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) { - if (rb_is_const_id(const_name)) { + if (rb_is_const_id(const_name) && !RB_CONST_PRIVATE_P((rb_const_entry_t *)const_value)) { rb_ary_push((VALUE)ary, ID2SYM((ID)const_name)); } return ST_CONTINUE; -- cgit v1.2.3