Commit 2253a86
committed
Strip default proc in Hash#freeze
A frozen Hash cannot be mutated, so a default proc that inserts
missing keys would raise FrozenError anyway. Clearing it before
freeze allows Hashes to be made Ractor-shareable (default procs
capture self, which prevents Ractor.make_shareable from succeeding).1 parent 1d5d5f5 commit 2253a86
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
0 commit comments