diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index b40cab8..9b6e1d8 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -378,4 +378,11 @@ class TestClass < Test::Unit::TestCase assert_predicate(self.singleton_class, :singleton_class?, feature7609) assert_not_predicate(self.class, :singleton_class?, feature7609) end + + def test_singleton_class_p_module_function + bug9311 = '[Bug #9311]' + assert_nothing_raised(bug9311) do + mod = Module.new do module_function :singleton_class? end + end + end end