From 6ea002a7a28ac11424798f448f1765ccf0513b95 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 19 Jul 2016 06:39:01 +0000 Subject: 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 --- test/ruby/test_module.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') 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 -- cgit v1.2.3