From: jzakiya Date: 2010-12-28T02:25:22+09:00 Subject: Re: inject issue On Dec 27, 4:23 am, Ryan Davis wrote: > On Dec 27, 2010, at 00:55 , Skye Shaw!@#$ wrote: > > >> Is this a bug, or is this the expected operation? > > > Expected, though it's an odd way to require libs. Use %/ap > > mathn .../.each { |lib| require lib } > > Even better, use simple code for simple problems: > > require "ap" > require "mathn" > # ...etc... > > It REALLY isn't cleaning anything up to use enumeration there. I was wondering why these are equivalent: a=(1..100).inject :+ b=(1..100).inject 0, :+ but these aren't %w/lib1 lib2 lib3/.inject :require %w/lib1 lib2 lib3/.inject 0, :require