[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[ruby-core:63066] [Backport21 - Backport #9575] [Closed] Step with 0 step is buggy
From:
nagachika00@...
Date:
2014-06-10 17:24:41 UTC
List:
ruby-core #63066
Issue #9575 has been updated by Tomoyuki Chikanaga.
Status changed from Open to Closed
% Done changed from 0 to 100
Applied in changeset r46401.
----------
merge revision(s) r45207,r45208,r45209,r45210: [Backport #9575]
* numeric.c: Create var for rb_intern("<=>")
* numeric.c: Fix Numeric#step with 0 unit [Bug #9575]
----------------------------------------
Backport #9575: Step with 0 step is buggy
https://bugs.ruby-lang.org/issues/9575#change-47144
* Author: Marc-Andre Lafortune
* Status: Closed
* Priority: Normal
* Assignee: Yui NARUSE
----------------------------------------
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.
--
https://bugs.ruby-lang.org/