Re:(1..100).inject(&:+)
by Darmani on Monday February 25, 2008 @04:27PM
(#123362)
Tokens beginning with a colon are literal Ruby symbols.
Prepending an ampersand before the last argument of a method call means that argument should be converted into a Proc and sent as a callback block to that method.
Prepending an ampersand before the last argument of a method call means that argument should be converted into a Proc and sent as a callback block to that method.