Sha256: de7da5ef96c304cc522089c1b33e482137545e5e16781d41daed1016348a2009
Contents?: true
Size: 454 Bytes
Versions: 16
Compression:
Stored size: 454 Bytes
Contents
require 'facets/thread.rb' require 'test/unit' class TC_Thread < Test::Unit::TestCase def test_threaded_map r = [1,2,3].threaded_map{ |e| e + 1 } assert_equal([2,3,4], r) end def test_threaded_map_send r = [1,2,3].threaded_map_send(:+, 1) assert_equal([2,3,4], r) end def test_map_send_with_block r = [[1,2,3],[2,3,4],[3,4,5]].threaded_map_send(:select){ |x| x > 2 } assert_equal([[3],[3,4],[3,4,5]], r) end end
Version data entries
16 entries across 16 versions & 1 rubygems