Sha256: 4ca56a54d0820d8e7d710204dceb834209117509f3ee6739bd42792a397a1a0d
Contents?: true
Size: 341 Bytes
Versions: 16
Compression:
Stored size: 341 Bytes
Contents
require 'facets/enumerable/inject' require 'test/unit' class TestEnumerableInject < Test::Unit::TestCase def test_inject! r = [1,2,3,4,5].inject!([]){ |a,i| a << i % 2 } e = [1,0,1,0,1] assert_equal(e, r) end def test_inject_equal! r = [].inject!([]){ |a,i| a << i % 2 } e = [] assert_equal(e, r) end end
Version data entries
16 entries across 16 versions & 1 rubygems