aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-19 06:39:01 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-07-19 06:39:01 +0000
commitb16e5cd6337cb68c1ae5c8a47fac251ec9940096 (patch)
tree53aac200b92c8e121fabd1f1ae65ffb765c015d1 /test/ruby/test_module.rb
parent547346914f98799fd45893f5572d2112afa27d0d (diff)
downloadruby-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/test_module.rb')
-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 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