diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-19 06:39:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-07-19 06:39:01 +0000 |
commit | b16e5cd6337cb68c1ae5c8a47fac251ec9940096 (patch) | |
tree | 53aac200b92c8e121fabd1f1ae65ffb765c015d1 /test/ruby | |
parent | 547346914f98799fd45893f5572d2112afa27d0d (diff) | |
download | ruby-b16e5cd6337cb68c1ae5c8a47fac251ec9940096.tar.gz |
variable.c: exclude private constants
* 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/trunk@55705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_module.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 92c3dfd6eb..0f9351c57d 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -1423,6 +1423,8 @@ class TestModule < Test::Unit::TestCase def test_constants_with_private_constant assert_not_include(::TestModule.constants, :PrivateClass) + assert_not_include(::TestModule.constants(true), :PrivateClass) + assert_not_include(::TestModule.constants(false), :PrivateClass) end def test_toplevel_private_constant |