種類
- インスタンスメソッド (66)
- 特異メソッド (22)
- 文書 (11)
キーワード
-
close
_ write (11) - closed? (22)
- open (22)
-
ruby 1
. 8 . 3 feature (11)
検索結果
先頭5件
-
CSV
# close _ read -> nil (24323.0) -
IO#close_read に委譲します。
...IO#close_read に委譲します。
@see IO#close_read... -
IO
# close _ read -> nil (24313.0) -
読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。
...す。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
IO.popen("/bin/sh","r+") do |f|
f.close_read
# f.readlines # => IOError: not opened for reading
end......//}
@see IO#close, IO#closed?, IO#close_write......す。
@raise IOError 自身が読み込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
IO.popen("/bin/sh","r+") do |f|
f.close_read
# f.readlines # => IOError: not opened for reading
end... -
StringIO
# close _ read -> nil (24301.0) -
自身に対する読み取りを禁止します。
...自身に対する読み取りを禁止します。
@raise IOError 自身がすでに読み取り不可だった場合に発生します。... -
IO
# close _ write -> nil (6212.0) -
書き込み用の IO を close します。
...@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
f = IO.popen("/bin/sh","r+") do |f|
f.close_write
# f.print "nowhere" # => IOError: not opened for writin......g
end
//}
@see IO#close, IO#closed?, IO#close_read......@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX close に失敗した場合に発生します。
//emlist[例][ruby]{
f = IO.popen("/bin/sh","r+") do |f|
f.close_write
# f.print "nowhere" # => IOError: not opened for writing......end
//}
@see IO#close, IO#closed?, IO#close_read... -
ruby 1
. 8 . 3 feature (4602.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...ruby 1.8.3 feature
*((<ruby 1.8 feature>))
*((<ruby 1.8.2 feature>))
ruby 1.8.2 から ruby 1.8.3 までの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリ......ard-compatibility
* 影響の範囲が小さいと思われる変更もこちら
* [change]: 変更されたクラス/メソッドなど(互換性のない変更)
* [obsolete]: 廃止された(される予定の)機能
* [platform]: 対応プラットフォームの追加
bundled librar......ます。
: StringIO [lib] [compat]
close, close_read, close_write が ((<IO>)) と同じように、
nil を返すようになりました。((<ruby-dev:25623>))
=== 2005-01-29
: Resolv::DNS::Resource::IN::SRV [lib] [new]
追加
(RFC2782)
=== 2005-01-26
: File#flock [ruby] [bug]
Wind... -
StringIO
# closed? -> bool (3106.0) -
自身が既に close されていた場合に true を返します。そうでない場合は、false を返します。
...身が既に close されていた場合に true を返します。そうでない場合は、false を返します。
//emlist[例][ruby]{
require "stringio"
sio = StringIO.open("hoge")
p sio.closed? # => false
sio.close_read
p sio.closed? # => false
sio.close_write
p sio.closed? # => true
//}... -
CSV
. open(filename , mode = "rb" , options = Hash . new) -> CSV (236.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......に指定したエン
コーディングをチェックします。"rb:UTF-32BE:UTF-8" のように mode を指定
すると UTF-32BE のデータを読み込んでUTF-8 に変換してから解析します。
また "rb:BOM|UTF-8" のように mode を指定すると BOM を自動的に取り除......IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#se... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (236.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......に指定したエン
コーディングをチェックします。"rb:UTF-32BE:UTF-8" のように mode を指定
すると UTF-32BE のデータを読み込んでUTF-8 に変換してから解析します。
また "rb:BOM|UTF-8" のように mode を指定すると BOM を自動的に取り除......IO#close
* IO#close_read
* IO#close_write
* IO#closed?
* IO#eof
* IO#eof?
* IO#external_encoding
* IO#fcntl
* IO#fileno
* File#flock
* IO#flush
* IO#fsync
* IO#internal_encoding
* IO#ioctl
* IO#isatty
* File#path
* IO#pid
* IO#pos
* IO#pos=
* IO#reopen
* IO#se... -
IO
# closed? -> bool (118.0) -
self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に true を返します。 そうでない場合は false を返します。
...true を返します。
そうでない場合は false を返します。
//emlist[例][ruby]{
IO.write("testfile", "test")
f = File.new("testfile")
f.close # => nil
f.closed? # => true
f = IO.popen("/bin/sh","r+")
f.close_write # => nil
f.closed? # => false
f.close_read #......=> nil
f.closed? # => true
//}
@see IO#close, IO#close_read, IO#close_write...