種類
- インスタンスメソッド (72)
- 特異メソッド (24)
- 文書 (12)
キーワード
-
close
_ write (12) - closed? (24)
- open (24)
-
ruby 1
. 8 . 3 feature (12)
検索結果
先頭5件
-
CSV
# close _ read -> nil (24223.0) -
IO#close_read に委譲します。
...IO#close_read に委譲します。
@see IO#close_read... -
IO
# close _ read -> nil (24213.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 (24201.0) -
自身に対する読み取りを禁止します。
...自身に対する読み取りを禁止します。
@raise IOError 自身がすでに読み取り不可だった場合に発生します。... -
IO
# close _ write -> nil (6112.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 (3120.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 までの変更点です。
掲載方針
*バグ修正の影響も含めて動作が変わるものを収録する。
*単にバグを直しただけのものは収録しない。
*ライブラリ......。
以下は各変更点に付けるべきタグです。
記号について(特に重要なものは大文字(主観))
* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追......ます。
: 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 (3006.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 (106.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......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 (106.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...クローズします。
ブロックが与えられなかった場合は CSV オブジェクトを返します。
データが Encoding.default_external と異なる場合は、mode にエンコー
ディングを指定する文字列を埋め込まなければなりません。データをどの......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 (18.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...