< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事(スレッド移動)
N :次の記事(スレッド移動)
|<:前のスレッド
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
Issue #9575 has been reported by Marc-Andre Lafortune.
----------------------------------------
Bug #9575: Step with 0 step is buggy
https://bugs.ruby-lang.org/issues/9575
* Author: Marc-Andre Lafortune
* Status: Open
* Priority: Normal
* Assignee: Marc-Andre Lafortune
* Category: core
* Target version: current: 2.2.0
* ruby -v: r45199
* Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
I didn't realize that we now allow stepping with a '0' step. It should probably have been mentioned in the NEWS of 2.1.0?
Anyways, couple of bugs with that new feature:
bn = 1 << 100
bn.step(by: 0, to: bn).first(2) # => [bn, bn] ok
bn.step(by: 0).first(2) # => [bn.to_f, bn.to_f] not ok
bn.step(by: 0, to: 0).first(2) # => [] not ok
The corresponding `size` don't all work either:
bn.step(by: 0) # => Float::INFINITY, ok
bn.step(by: 0, to: bn).size # => ZeroDivisionError: divided by 0, should be infinity
bn.step(by: 0, to: 0).size # => same
1.step(by:0, to: 42).size # => same
My patch is almost finished.
--
http://bugs.ruby-lang.org/