[#92891] Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1? — Al Snow <jasnow@...>
Tried the new 2.7.0-preview1 upgrade to Ruby and see that bundler is also upgraded (to 2.1.0.pre.1).
5 messages
2019/05/30
[#92892] Re: Question: ruby 2.7.0-preview1 also upgrades bundler to 2.1.0.pre.1?
— SHIBATA Hiroshi <hsbt@...>
2019/05/30
Bundler 2.1.0.pree.1 is the expected version.
[ruby-core:92894] [Ruby trunk Bug#15889] Enumerator#each_slice size FloatDomainError with infinite enumerator
From:
tom@...
Date:
2019-05-30 19:08:44 UTC
List:
ruby-core #92894
Issue #15889 has been reported by Freaky (Thomas Hurst).
----------------------------------------
Bug #15889: Enumerator#each_slice size FloatDomainError with infinite enumerator
https://bugs.ruby-lang.org/issues/15889
* Author: Freaky (Thomas Hurst)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-freebsd12.0]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Calling `#size` on an infinite `each_slice` Enumerator results in a `FloatDomainError` exception:
``` ruby
1.step.size # => Infinity
1.step.each_slice(2).size # => FloatDomainError
```
```
Traceback (most recent call last):
...
3: from (irb):3:in `size'
2: from (irb):3:in `div'
1: from (irb):3:in `floor'
FloatDomainError (Infinity)
```
Looks like `enum_each_slice_size()` is missing a guard conditional prior to calling `div_int()` with the slice size.
This was reported by Josh Cheek on Twitter: https://twitter.com/josh_cheek/status/1134123733445218304
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>