From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2026-05-23T06:21:27+00:00 Subject: [ruby-core:125569] [Ruby Bug#21961] Marshal.load freeze option fail to freeze linked strings Issue #21961 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED, 4.0: DONE to 3.2: WONTFIX, 3.3: DONE, 3.4: DONE, 4.0: DONE ruby_3_4 commit:054f59c8f58da5c3dbf8aedf2caf53e5011e8e13 merged revision(s) commit:54c4694994cc3bcfea9058b22ba3e68af6aaf740. ---------------------------------------- Bug #21961: Marshal.load freeze option fail to freeze linked strings https://bugs.ruby-lang.org/issues/21961#change-117398 * Author: byroot (Jean Boussier) * Status: Closed * Backport: 3.2: WONTFIX, 3.3: DONE, 3.4: DONE, 4.0: DONE ---------------------------------------- ```ruby str = "test" arr = [str, str] strings = Marshal.load(Marshal.dump(arr), freeze: true) p strings.map(&:frozen?) # => [true, false] ``` Expected: `[true, true]` Patch: https://github.com/ruby/ruby/pull/16500 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/