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

Actions

Also available in: PDF Atom