diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-05-15 15:47:02 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-05-15 15:47:02 +0900 |
| commit | 7f1f499b2277c4636824b7f3e9b301576aaddba5 (patch) | |
| tree | 1c0487cfdbd16f7fe3b83a8d0d9c82bf96133bca /test | |
| parent | 780342eddb880a1c0a457311b005398ce36d0c9f (diff) | |
| parent | cc7f9190ba93ef45bf85a7278dffe6326cf620a3 (diff) | |
| download | mruby-7f1f499b2277c4636824b7f3e9b301576aaddba5.tar.gz mruby-7f1f499b2277c4636824b7f3e9b301576aaddba5.zip | |
Merge pull request #4400 from shuujii/fix-name-assignment-to-frozen-anonymous-class-module
Fix name assignment to frozen anonymous class/module
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/module.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 09613e1bc..f4999019a 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -653,6 +653,10 @@ assert('Module#to_s') do assert_match "#<Module:0x*>", Module.new.to_s assert_match "#<Class:0x*>", Class.new.to_s + + assert_equal "FrozenClassToS", (FrozenClassToS = Class.new.freeze).to_s + assert_equal "Outer::A", (Outer::A = Module.new.freeze).to_s + assert_match "#<Module:0x*>::A", (Module.new::A = Class.new.freeze).to_s end assert('Module#inspect') do |
