On Sun, Feb 20, 2011 at 11:44 AM, Gaba Luschi <friedoysterlover / gmail.com>wrote:

> Hi,
>
> What does the 'w' in the "CSV.open" part of the below code do?
>
> CSV.open('text2.txt','w') do |csv|
>  people.each do |person|
>    csv <<person
>
> --
> Posted via http://www.ruby-forum.com/.
>
>
"Write-only, truncates existing file to zero length or creates a new file
for writing"

You can see all the options at the top of this page:
http://ruby-doc.org/core/classes/IO.html