On Monday, July 12, 2004, 8:33:51 AM, Sam wrote:

> There's a few trivial but useful "extensions" to Ruby's standard
> library that I find myself using in most of my projects. I'll share a
> couple, and I'd really love to see what you're using, too. [.....]

Hi Sam,

'foldl' is, I believe, the same as Enumeration#inject.  Try checking
out the docs for that, but:

  (1..100).inject(0) { |acc,x| acc + x }

That "defensive attribute reader" was interesting; thanks.

For more of these, check out

   www.rubygarden.org/ruby?StandardClassExtentions

Some of those, and others besides, are coded up in the 'extensions'
project on RubyForge, for which I'll gratefully receive suggestions.

Cheers,
Gavin