ufuk (Ufuk Kayserilioglu) wrote in #note-3: > One concern that I have about this proposal is that the method proposed needs to iterate all the items to be sure that it found the longest slice, but an `Enumerable` can be infinite, which ...datibbaw (Tjerk Meesters)
nobu (Nobuyoshi Nakada) wrote in #note-1: > Applied in changeset commit:git|c99813a8d8484058987c968923cd814e99aa6dd3. > ... Thanks for that, but that only fixes a small part of the issue; the rest involves the Happy Eyeballs implementa...datibbaw (Tjerk Meesters)
Follow-up to #22538. For `--disable-ipv6` builds, the `require 'socket'` statement no longer raises an error since c99813a8d8. However: * When the OS supports IPv6, DNS lookups still return IPv6 addresses, and * The Happy Eyeba...datibbaw (Tjerk Meesters)
duerst (Martin Dürst) wrote in #note-1: > My impression is that this proposal is useful in some cases, but these are too rare to include it in core. This functionality is better suited for a gem. Maybe it's already available in some gem...datibbaw (Tjerk Meesters)
I propose adding `Enumerable#longest_slice`, which returns a Range identifying the longest consecutive sequence of matching entries. Without a block, entries match when they are truthy. Both `nil` and `false` break a sequence. With a ...datibbaw (Tjerk Meesters)