From: Jeremy McAnally Date: 2008-02-18T16:01:55+09:00 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