From: Martin DeMello Date: 2005-05-13T14:05:29+09:00 Subject: Re: {} vs begin/end [was Re: object loops and what they return] Brian Schr�der wrote: > > print "100! = " > puts (1..100).inject(1) { |r,v| > r*v > } Tangentially, inject uses the first value of the enumerable as the seed if you don't supply one (the joys of dynamic typing!), so you can simply say (1..100).inject {|r,v| r*v} martin