HomePhorge

Backport Enumerable#count to Rubies < 1.8.7
3ed6499c6e52Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Backport Enumerable#count to Rubies < 1.8.7

We quite often mistakenly use Array#count, which is only available in
Rubies >= 1.8.7, when we mean Array#size or Array#length. Because this
causes so much trouble, it seems valuable to simply backport
Enumerable#count and provide the method.

Details

Provenance
Nick Lewis <nick@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU5f44c23b0a9d: More 1.8.5 compatibility fixes.
Branches
Unknown
Tags
Unknown

Event Timeline

Nick Lewis <nick@puppetlabs.com> committed rPU3ed6499c6e52: Backport Enumerable#count to Rubies < 1.8.7 (authored by Nick Lewis <nick@puppetlabs.com>).Oct 22 2011, 12:51 AM