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: 7stud -- Newsgroups: comp.lang.ruby Subject: Re: File.open options hash "mode" as int Date: Tue, 17 May 2011 13:49:12 -0500 Organization: Service de news de lacave.net Lines: 29 Message-ID: References: <3b31a717b9a883ae736dbcc1c08ad51e@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 1305658172 28123 65.111.164.187 (17 May 2011 18:49:32 GMT) X-Complaints-To: abuse@lacave.net NNTP-Posting-Date: Tue, 17 May 2011 18:49:32 +0000 (UTC) In-Reply-To: <3b31a717b9a883ae736dbcc1c08ad51e@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: 383395 X-Ml-Name: ruby-talk X-Rubymirror: Yes X-Ruby-Talk: Xref: x330-a1.tempe.blueboxinc.net comp.lang.ruby:4685 Well, the docs say this: =3D=3D=3D IO.open(fd, mode_string=3D"r" [, opt] ) =E2=86=92 io IO.open(fd, mode_string=3D"r" [, opt] ) {|io| block } =E2=86=92 obj Document-method: IO::open With no associated block, open is a synonym for IO.new. =3D=3D=3D =3D=3D=3D IO.new(fd [, mode] [, opt]) =E2=86=92 io Returns a new IO object (a stream) for the given IO object or integer = file descriptor and mode string. See also IO.sysopen and IO.for_fd. Parameters fd: numeric file descriptor mode: file mode. a string or an integer opt: hash for specifying mode by name. =3D=3D=3D The last line there seems to be why you are getting the error. -- = Posted via http://www.ruby-forum.com/.=