Sha256: 25895f05a42f3f9a4fec1a28c782e2203116d19dccd2083df71f08b185bf1fc6

Contents?: true

Size: 199 Bytes

Versions: 3

Compression:

Stored size: 199 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.9.0'

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
godfat-ludy-0.1.13 lib/ludy/array/count.rb
ludy-0.1.11 lib/ludy/array/count.rb
ludy-0.1.13 lib/ludy/array/count.rb