summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-11 18:39:06 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-11 18:39:06 +0000
commit717f31e0756ac0f7c1e0c47c7a91356d0cbccc71 (patch)
tree086d847be1de409dc6c769b1ace3d9d4fa980330 /test
parentc20b07d5357d7cb73226b149431a658cde54a697 (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 'test')
-rw-r--r--test/ruby/test_module.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 1e5e5a428d..06744b5249 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -1425,6 +1425,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