diff options
author | Jean Boussier <jean.boussier@gmail.com> | 2019-09-26 13:41:41 +0200 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-09-26 23:29:49 +0900 |
commit | 5b9d646944fe3a2f92682be906b0e9c7beae323c (patch) | |
tree | 99861231d07caebe0587cc4fa7320a3551e03177 | |
parent | b29c68e6876976b22f64318bf390f05447e4ca01 (diff) | |
download | ruby-5b9d646944fe3a2f92682be906b0e9c7beae323c.tar.gz |
Fix Module#name news and add a test
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | test/ruby/test_module.rb | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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:: diff --git a/test/ruby/test_module.rb b/test/ruby/test_module.rb index 8689c60dcd..8b95ecedc4 100644 --- a/test/ruby/test_module.rb +++ b/test/ruby/test_module.rb @@ -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 |