--L/Qt9NZ8t00Dhfad Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Shot (Piotr Szotkowski): > I trying to write an Enumerable#parallel method that, dependingn > a config option (retrieved inside it) would end up being an alias for > either Enumerable#map or Enumerable#forkoff. FWIW, the spec to pass is describe Enumerable do it 'should be able to process in parallel, depending on config option' do ArtDecomp::Config.processes = 1 pid1, pid2 = [1,2].parallel { Process.pid } pid1.should == pid2 ArtDecomp::Config.processes = 2 pid1, pid2 = [1,2].parallel { Process.pid } pid1.should_not == pid2 end end -- Shot -- E is for emacs, which rebinds your keys, and F is for fsck, which rebuilds your trees. G is for grep, a clever detective, while H is for halt, which may seem defective. --L/Qt9NZ8t00Dhfad Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFIMI5Pi/mCfdEo8UoRAlrmAKCOcUY4RZX5DAgrjtl8sByJLhvhJACg0taX rx7wWiIAa5UCE0EbxOY5X3Iw -----END PGP SIGNATURE----- --L/Qt9NZ8t00Dhfad--