Project

General

Profile

Actions

Feature #19163

closed

Data object should be frozen

Added by matz (Yukihiro Matsumoto) almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-dev:52007]

Description

If we call initialize (via send), we can rewrite an existing Data object.

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.

Actions #2

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by nobu (Nobuyoshi Nakada) almost 2 years ago

  • Status changed from Open to Closed

Applied in changeset git|a14a1a5626a4d8e661a3e606f8f92b8c455b9a04.


[Feature #19163] Data object should be frozen

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0