Sha256: 07dca10fcd96ecb75dd308fa78714160229dacdfe00bbee9d8e76c25a965b428

Contents?: true

Size: 198 Bytes

Versions: 1

Compression:

Stored size: 198 Bytes

Contents

require 'ludy/version'

class Array
  # it would be defined if RUBY_VERSION < '1.9.0', see rdoc in ruby 1.9
  def count t
    inject(0){|r,i| i==t ? r+=1 : r}
  end
end if Ludy.ruby_before '1.8.7'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ludy-0.1.15 lib/ludy/array/count.rb