
1 Dec
2022
1 Dec
'22
8:06 a.m.
Issue #19163 has been reported by matz (Yukihiro Matsumoto). ---------------------------------------- Feature #19163: Data object should be frozen https://bugs.ruby-lang.org/issues/19163 * Author: matz (Yukihiro Matsumoto) * Status: Open * Priority: Normal ---------------------------------------- If we call `initialize` (via `send`), we can rewrite an existing Data object. ```ruby d=Data.define(:a, :b).new(1,2) p d #=> #<data a=1, b=2> d.send(:initialize, {a:3,b:4}) p d #=> #<data a=3, b=4> ``` Should we freeze the Data object after calling `initialize` for the first time? Matz. -- https://bugs.ruby-lang.org/