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


Groups > comp.lang.ruby > #4765

Re: File.open options hash "mode" as int

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!talisker.lacave.net!lacave.net!not-for-mail
From Roger Pack <rogerpack2005@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: File.open options hash "mode" as int
Date Thu, 19 May 2011 10:13:00 -0500
Organization Service de news de lacave.net
Lines 22
Message-ID <53fd984f5bffbb0d6f70d06772856741@ruby-forum.com> (permalink)
References <3b31a717b9a883ae736dbcc1c08ad51e@ruby-forum.com> <b085cd263884d6eeae5b4c5e0870b6e1@ruby-forum.com> <59e82ce3f74c49b57360446162769a13@ruby-forum.com> <5972e92598eff180d6f8f1ed31683809@ruby-forum.com>
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding Quoted-printable
X-Trace talisker.lacave.net 1305818007 23659 65.111.164.187 (19 May 2011 15:13:27 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Thu, 19 May 2011 15:13:27 +0000 (UTC)
In-Reply-To <5972e92598eff180d6f8f1ed31683809@ruby-forum.com>
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 383473
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <53fd984f5bffbb0d6f70d06772856741@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:4765

Show key headers only | View raw


> opt:  hash for specifying mode by name.

I guess this is why.  I just don't see quite *why* it requires mode by 
name in opts, but accepts it by int when given as a parameter.  But that 
makes sense.

A few more notes.

> IO.open(fd, mode_string="r" [, opt] ) → io

Yeah, interestingly, this doesn't look at all like
File.open('filename')
so...the docs just lack the most common usage of File.open apparently? 
Odd.

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next 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