[#107867] Fwd: [ruby-cvs:91197] 8f59482f5d (master): add some tests for Unicode Version 14.0.0 — Martin J. Dürst <duerst@...>
To everybody taking care of continuous integration:
3 messages
2022/03/13
[#108090] [Ruby master Bug#18666] No rule to make target 'yaml/yaml.h', needed by 'api.o' — duerst <noreply@...>
Issue #18666 has been reported by duerst (Martin D端rst).
7 messages
2022/03/28
[#108117] [Ruby master Feature#18668] Merge `io-nonblock` gems into core — "Eregon (Benoit Daloze)" <noreply@...>
Issue #18668 has been reported by Eregon (Benoit Daloze).
22 messages
2022/03/30
[ruby-core:107911] [Ruby master Bug#18635] Enumerable#inject without block/symbol will return values or raise LocalJumpError
From:
"bjfish (Brandon Fish)" <noreply@...>
Date:
2022-03-15 14:15:56 UTC
List:
ruby-core #107911
Issue #18635 has been reported by bjfish (Brandon Fish).
----------------------------------------
Bug #18635: Enumerable#inject without block/symbol will return values or raise LocalJumpError
https://bugs.ruby-lang.org/issues/18635
* Author: bjfish (Brandon Fish)
* Status: Open
* Priority: Normal
* ruby -v: 3.0.3
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
The following shows inconsistent behavior when no block/symbol are provided to inject.
``` ruby
irb(main):002:0> {}.inject
=> nil
irb(main):003:0> {one: 1}.inject
=> [:one, 1]
irb(main):004:0> {one: 1, two: 2}.inject
(irb):4:in `each': no block given (LocalJumpError)
irb(main):005:0> [].inject
=> nil
irb(main):006:0> [1].inject
=> 1
irb(main):007:0> [1, 2].inject
(irb):7:in `each': no block given (LocalJumpError)
```
I would expect the results to be consistent by always raising a LocalJumpError or raising an ArgumentError when no block and symbol are given.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>