Range#count should yield to the given block and return a count of truthy results. Instead, when begin is an Integer and it is not "endless", it immediately returns the size of the range.
[] jruby $ jruby -e 'p (1..90).count { it <= 10 }'
90
[] jruby $ cx 3.4 ruby -e 'p (1..90).count { it <= 10 }'
10
The logic for count needs to be updated to current Ruby behavior. This regressed in JRuby 10 at 79ee920. JRuby 9.4 is unaffected because this code does not exist there and it falls back on Enumerable#count.
Range#countshould yield to the given block and return a count of truthy results. Instead, whenbeginis anIntegerand it is not "endless", it immediately returns the size of the range.The logic for
countneeds to be updated to current Ruby behavior. This regressed in JRuby 10 at 79ee920. JRuby 9.4 is unaffected because this code does not exist there and it falls back onEnumerable#count.