Peter Zhu 2026-10-06 13:08:25 +0000 (Tue, 06 Oct 2026)
New Revision: 6b1add1e70
https://github.com/ruby/ruby/commit/6b1add1e70
Log:
Fix Array#sum when init is float but array contains non-float
If the initial value is a float but an element of the array is not a float,
then it could be lost and an error won't be raised. For example, the following
code should raise a TypeError but currently does not:
["hello"].sum(10.0)
Modified files:
array.c
test/ruby/test_array.rb