Joined May 2011
·

Andrea Pavoni

developer at Nebulab.it
·
Rome, Italy
·
·
·

Thanks for the link. To be honest, I wrote this tip several days before that Readme was updated with those instructions. Moreover, I've used the non-lazy way ;-)

@samnang ehm, I know it works because I've used it for my own needs :-)

Posted to Ruby implicit coercion over 1 year ago

Nice tip! It's also possible to use this syntax:

@entries.inject(:+)

no need to pass the first value (0 in this case), because it's already used by default.

Achievements
201 Karma
6,033 Total ProTip Views