diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-11 18:39:06 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-11 18:39:06 +0000 |
commit | 717f31e0756ac0f7c1e0c47c7a91356d0cbccc71 (patch) | |
tree | 086d847be1de409dc6c769b1ace3d9d4fa980330 /variable.c | |
parent | c20b07d5357d7cb73226b149431a658cde54a697 (diff) |
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_3@55868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 1a18c379fd..3690c1bddd 100644 --- a/variable.c +++ b/variable.c @@ -2376,7 +2376,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; |