From: under_free_fall@...
Date: 2021-01-23T00:01:32+00:00
Subject: [ruby-dev:50994] [Ruby master Bug#17572] coerceで作成した(0.0/1)を計算に用いるとコアダンプする

Issue #17572 has been reported by freedom (free dom).

----------------------------------------
Bug #17572: coerceで作成した(0.0/1)を計算に用いるとコアダンプする
https://bugs.ruby-lang.org/issues/17572

* Author: freedom (free dom)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
coerceで`(0.0/1)`等の値を作成することができ、こちらを計算に使用するとコアダンプして落ちます(出力は添付参照)

再現コード

``` ruby
1/0r.coerce(0.0+0i)[0]
```

よろしくおねがいします

---Files--------------------------------
coredump (19 KB)


-- 
https://bugs.ruby-lang.org/