[#104004] [Ruby master Feature#17883] Load bundler/setup earlier to make `bundle exec ruby -r` respect Gemfile — mame@...
Issue #17883 has been reported by mame (Yusuke Endoh).
21 messages
2021/05/24
[ruby-core:104093] [Ruby master Bug#17889] Enumerator::Lazy#with_index should return size
From:
nagachika00@...
Date:
2021-05-29 05:05:25 UTC
List:
ruby-core #104093
Issue #17889 has been updated by nagachika (Tomoyuki Chikanaga).
Backport changed from 2.6: DONTNEED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONE
ruby_3_0 20bf397f7cebd8156d76941dd54659cf9b8c8fe7 merged revision(s) fd8991f797c145615820b4c76e6b7ac5a71339ea.
----------------------------------------
Bug #17889: Enumerator::Lazy#with_index should return size
https://bugs.ruby-lang.org/issues/17889#change-92266
* Author: bjfish (Brandon Fish)
* Status: Closed
* Priority: Normal
* ruby -v: 3.0.0
* Backport: 2.6: DONTNEED, 2.7: REQUIRED, 3.0: DONE
----------------------------------------
The following example shows `#size` returns `nil` when the `size` was provided to `new` as `3`.
**Example**
``` ruby
p Enumerator::Lazy.new([1, 2, 3], 3){|y, v| y << v}.with_index.size
```
**Expected Result**
``` ruby
3
```
**Actual Result**
``` ruby
nil
```
--
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>