
6 Mar
2025
6 Mar
'25
3:33 p.m.
Issue #21175 has been reported by andrykonchin (Andrew Konchin). ---------------------------------------- Bug #21175: Range#max called on a beginles Integer Range with excluded end raises TypeError https://bugs.ruby-lang.org/issues/21175 * Author: andrykonchin (Andrew Konchin) * Status: Open * ruby -v: 3.4.2 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- I would expect that for a Range with Integer right boundary `end - 1` is returned: ```ruby (nil...10).max # => (irb):1:in 'Range#max': cannot exclude end value with non Integer begin value (TypeError) ``` -- https://bugs.ruby-lang.org/