Project

General

Profile

Actions

Bug #17574

closed

Hash#inspect segfault

Added by 01wsmith (w smith) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]
[ruby-core:102207]

Description

While working in irb, I encountered an issue:

x = {1 => {2 => 5}, 3 => {4 => 6}}
y = x[1]
y[11] = 3
x.transform_values!(&:clone)
y[11] = nil
x

x.inspect causes irb to segfault.

I was not able to test this on ruby 3.0.0.
While experimenting with this I found that x[1] may change.
However, it seems to work fine in ruby itself.

irb -v: irb 1.2.1 (2019-12-24)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0