Group: comp.lang.ruby
From: Jeremy McAnally
Date: Monday, February 18, 2008 1:01 AM
Subject: Re: Help with Writing Replacement Text to Files

Oops. Try "w+" instead.

*has Python/PHP file read modes on the brain*

--Jeremy

On Feb 18, 2008 1:55 AM, 7stud -- wrote:
> Jeremy McAnally wrote:
> > Try this:
> >
> > File.open("config.txt", "rw") do |f|
> >
>
> File.open('data.text', 'rw') do |f|
> end
>
> --output:--
> r1test.rb:1:in `initialize': illegal access mode rw (ArgumentError)
> from r1test.rb:1:in `open'
> from r1test.rb:1
> --
> Posted via http://www.ruby-forum.com/.
>
>



--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)

Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com

Safety Articles | Usenet Groups | Usenet News | Bluegrass