D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Kernel
/
Filename :
open-i.ri
back
Copy
U:RDoc::AnyMethod[iI" open:ETI"Kernel#open;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"6Creates an IO object connected to the given file.;To:RDoc::Markup::BlankLine o; ; [I"XThis method has potential security vulnerabilities if called with untrusted input; ;TI">see {Command Injection}[rdoc-ref:command_injection.rdoc].;T@o; ; [I"2With no block given, file stream is returned:;T@o:RDoc::Markup::Verbatim; [I"&open('t.txt') # => #<File:t.txt> ;T:@format0o; ; [I"DWith a block given, calls the block with the open file stream, ;TI"then closes the stream:;T@o;; [I":open('t.txt') {|f| p f } # => #<File:t.txt (closed)> ;T; 0o; ; [I"Output:;T@o;; [I"#<File:t.txt> ;T; 0o; ; [I"See File.open for details.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"�open(path, mode = 'r', perm = 0666, **opts) -> io or nil open(path, mode = 'r', perm = 0666, **opts) {|io| ... } -> obj ;T0[ I"(*args);T@)FI"Kernel;TcRDoc::NormalModule00