Project

General

Profile

Actions

Bug #16366

closed

.count on endless range causes infinite loop

Added by duffyjp (Jacob Duffy) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]
[ruby-core:95939]

Description

Out of curiosity, I tried:

(1..).count

Which resulted in an unkillable 100% CPU irb session.

I expected either an exception or maybe Infinity

Thanks


Files

enum_count_pass-16366.patch (765 Bytes) enum_count_pass-16366.patch jeremyevans0 (Jeremy Evans), 11/26/2019 03:58 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0