Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #4684
| From | Roger Pack <rogerpack2005@gmail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | File.open options hash "mode" as int |
| Date | 2011-05-17 13:22 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <3b31a717b9a883ae736dbcc1c08ad51e@ruby-forum.com> (permalink) |
Hello.
in 1.9.x, I see that these work:
File.open('yo', 'w')
File.open('yo', File::WRONLY|File::TRUNC|File::CREAT)
File.open('yo', :mode => 'w')
So shouldn't this also work?
>> File.open('yo', :mode => File::WRONLY|File::TRUNC|File::CREAT)
TypeError: can't convert Fixnum into String
-roger-
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Next in thread | Find similar | Unroll thread
File.open options hash "mode" as int Roger Pack <rogerpack2005@gmail.com> - 2011-05-17 13:22 -0500
Re: File.open options hash "mode" as int 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-17 13:49 -0500
Re: File.open options hash "mode" as int Roger Pack <rogerpack2005@gmail.com> - 2011-05-17 14:28 -0500
Re: File.open options hash "mode" as int 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-17 16:43 -0500
Re: File.open options hash "mode" as int Roger Pack <rogerpack2005@gmail.com> - 2011-05-19 10:13 -0500
Re: File.open options hash "mode" as int 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-19 12:41 -0500
Re: File.open options hash "mode" as int Phillip Gawlowski <cmdjackryan@googlemail.com> - 2011-05-19 15:16 -0500
csiph-web