-
-
Notifications
You must be signed in to change notification settings - Fork 942
Closed
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels