1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix Module#name news and add a test

This commit is contained in:
Jean Boussier 2019-09-26 13:41:41 +02:00 committed by Nobuyoshi Nakada
parent b29c68e687
commit 5b9d646944
Notes: git 2019-09-26 23:30:16 +09:00
2 changed files with 6 additions and 2 deletions

4
NEWS
View file

@ -176,8 +176,8 @@ Module::
Module#const_defined?. [Feature #15777]
* Module#name now always return a frozen String. The returned String is
always the same for a given Module. This change is experimental
[Feature #16150]
always the same for a given Module. This change is
experimental. [Feature #16150]
ObjectSpace::WeakMap::

View file

@ -563,6 +563,10 @@ class TestModule < Test::Unit::TestCase
assert_equal("Integer", Integer.name)
assert_equal("TestModule::Mixin", Mixin.name)
assert_equal("TestModule::User", User.name)
assert_predicate Integer.name, :frozen?
assert_predicate Mixin.name, :frozen?
assert_predicate User.name, :frozen?
end
def test_accidental_singleton_naming_with_module