[ruby-core:95940] [Ruby master Bug#16366] .count on endless range causes infinite loop
| Newsgroups | gmane.comp.lang.ruby.core |
|---|---|
| Message-ID | <redmine.journal-82779.20191125163703.814ae05a21344995@ruby-lang.org> |
Issue #16366 has been updated by shevegen (Robert A. Heiler). Sounds like a bug - counting to infinity is not easy. :) ---------------------------------------- Bug #16366: .count on endless range causes infinite loop https://bugs.ruby-lang.org/issues/16366#change-82779 * Author: duffyjp (Jacob Duffy) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Out of curiosity, I tried: ``` ruby (1..).count ``` Which resulted in an unkillable 100% CPU irb session. I expected either an exception or maybe `Infinity` Thanks -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>