Actions
Bug #21175
closedRange#max called on a beginles Integer Range with excluded end raises TypeError
Bug #21175:
Range#max called on a beginles Integer Range with excluded end raises TypeError
Description
I would expect that for a Range with Integer right boundary end - 1 is returned:
(nil...10).max
# => (irb):1:in 'Range#max': cannot exclude end value with non Integer begin value (TypeError)
#max works well with non-nil begin:
(1...10).max
# => 9
Related issue - https://bugs.ruby-lang.org/issues/17034
Actions