Hi,

From: "Holden Glova" <dsafari / paradise.net.nz>
>
> [synack / Evergreen] ocelot $ ri File.open
[...]
>      With no associated block, open is a synonym for File::new. If the
>      optional code block is given, it will be passed file as an
>      argument, and the file will automatically be closed when the block
>      terminates. In this instance, File::open returns nil.

Is that last sentence from ri and the Pickaxe actually true?  If it is, I'm
trying to understand what it means - 'cause 

  data = File.open("test.dat", "r") { |f| f.read }

seems to return the result from the block, rather than nil (which is really
useful for me!)

Just curious....


Thanks,

Bill