Project

General

Profile

Actions

Bug #21961

closed

Marshal.load freeze option fail to freeze linked strings

Bug #21961: Marshal.load freeze option fail to freeze linked strings

Added by byroot (Jean Boussier) 12 days ago. Updated about 5 hours ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:125099]

Description

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

Updated by byroot (Jean Boussier) 12 days ago Actions #1

  • Description updated (diff)

Updated by byroot (Jean Boussier) 11 days ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|54c4694994cc3bcfea9058b22ba3e68af6aaf740.


marshal.c: properly freeze linked strings

[Bug #21961]

Updated by hsbt (Hiroshi SHIBATA) 9 days ago Actions #3 [ruby-core:125132]

  • Backport changed from 3.2: WONTFIX, 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED, 4.0: REQUIRED

Updated by byroot (Jean Boussier) 9 days ago Actions #4

  • Subject changed from Marshal.load freeze option fail to free linked strings to Marshal.load freeze option fail to freeze linked strings

Updated by k0kubun (Takashi Kokubun) about 5 hours ago Actions #5 [ruby-core:125186]

  • Backport changed from 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED, 4.0: REQUIRED to 3.2: WONTFIX, 3.3: DONE, 3.4: REQUIRED, 4.0: DONE
Actions

Also available in: PDF Atom