Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4684

File.open options hash "mode" as int

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail
From Roger Pack <rogerpack2005@gmail.com>
Newsgroups comp.lang.ruby
Subject File.open options hash "mode" as int
Date Tue, 17 May 2011 13:22:41 -0500
Organization Service de news de lacave.net
Lines 16
Message-ID <3b31a717b9a883ae736dbcc1c08ad51e@ruby-forum.com> (permalink)
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1305656763 25465 65.111.164.187 (17 May 2011 18:26:03 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Tue, 17 May 2011 18:26:03 +0000 (UTC)
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 383394
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <3b31a717b9a883ae736dbcc1c08ad51e@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:4684

Show key headers only | View raw


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 | NextNext in thread | Find similar | Unroll thread


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