Fix Module#name news and add a test
This commit is contained in:
parent
b29c68e687
commit
5b9d646944
Notes:
git
2019-09-26 23:30:16 +09:00
4
NEWS
4
NEWS
@ -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::
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user