Project

General

Profile

Feature #19163

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

If we call `initialize` (via `send`), we can rewrite an existing `Data` 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` Data object after calling `initialize` for the first time? 

 Matz.

Back