diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-01-20 15:05:30 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-01-20 19:24:16 +0900 |
commit | 565aeb81e0886c835888a425e5d05ed99fb03238 (patch) | |
tree | b5aba66bd777aecfcef47fa6ef90a494ab0a23e5 /test/ruby/test_class.rb | |
parent | f4a556f4f1bf82f944ef576fdb3acd755e567368 (diff) | |
download | ruby-565aeb81e0886c835888a425e5d05ed99fb03238.tar.gz |
Skip freezing check on setting temporary class path [Bug #17563]
Co-authored-by: ryannevell (Ryan Nevell) <ryan.nevell@gmail.com>
Diffstat (limited to 'test/ruby/test_class.rb')
-rw-r--r-- | test/ruby/test_class.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_class.rb b/test/ruby/test_class.rb index 6a8234a9d3..368c046261 100644 --- a/test/ruby/test_class.rb +++ b/test/ruby/test_class.rb @@ -730,4 +730,11 @@ class TestClass < Test::Unit::TestCase end; end + + def test_assign_frozen_class_to_const + c = Class.new.freeze + assert_same(c, Module.new.module_eval("self::Foo = c")) + c = Class.new.freeze + assert_same(c, Module.new.const_set(:Foo, c)) + end end |