Project

General

Profile

Actions

Bug #19445

closed

Segmentation fault with Numeric#step

Added by hsbt (Hiroshi SHIBATA) almost 2 years ago. Updated over 1 year ago.

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

Description

The following commands will cause a segmentation fault.

curl -s 'https://cache.ruby-lang.org/pub/misc/ci_versions/all.json' -o ruby_versions.json
ruby -rjson -e "min = JSON.parse(File.read('ruby_versions.json')).sort.first; p 2.2.step(by: 0.1, to: min).map{|v| v.round(1).to_s }"

Note: above code is working with min.to_f instead of min in Numeric#step.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like1Like0Like0Like0Like0