summaryrefslogtreecommitdiff
path: root/test/ruby/test_module.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_module.rb')
-rw-r--r--test/ruby/test_module.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb
index 6673852d9c..e72a6ab8c9 100644
--- a/test/ruby/test_module.rb
+++ b/test/ruby/test_module.rb
@@ -669,6 +669,19 @@ class TestModule < Test::Unit::TestCase
m.instance_eval { remove_const(:Foo) }
end
+ class Bug9413
+ class << self
+ Foo = :foo
+ end
+ end
+
+ def test_singleton_constants
+ bug9413 = '[ruby-core:59763] [Bug #9413]'
+ c = Bug9413.singleton_class
+ assert_include(c.constants(true), :Foo, bug9413)
+ assert_include(c.constants(false), :Foo, bug9413)
+ end
+
def test_frozen_class
m = Module.new
m.freeze