Project

General

Profile

Actions

Bug #21961

closed

Marshal.load freeze option fail to free linked strings

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

Added by byroot (Jean Boussier) 2 days ago. Updated 1 day 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) 2 days ago Actions #1

  • Description updated (diff)

Updated by byroot (Jean Boussier) 1 day ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|54c4694994cc3bcfea9058b22ba3e68af6aaf740.


marshal.c: properly freeze linked strings

[Bug #21961]

Actions

Also available in: PDF Atom