Project

General

Profile

Actions

Bug #18171

closed

`Marshal` ignores `Hash#compare_by_identity`

Added by nobu (Nobuyoshi Nakada) over 2 years ago. Updated over 2 years ago.

Status:
Closed
Target version:
-
[ruby-core:105282]

Description

Is this a bug?

h = {}.compare_by_identity
h["a"+"1"] = "1"
h["a"+"1"] = "2"
p h                             #=> {"a1"=>"1", "a1"=>"2"}
p Marshal.load(Marshal.dump(h)) #=> {"a1"=>"2"}
Actions

Also available in: Atom PDF

Like0
Like0