るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.080秒)

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

クラス

キーワード

検索結果

IO#close_read -> nil (18238.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: no...
...

@
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
//}

@
...

IO#close -> nil (137.0)

入出力ポートをクローズします。

...ていれば、そのプロセスの終
了を待ち合わせます。


@
raise Errno::EXXX close に失敗した場合に発生します。
@
raise IOError 既に close されていた場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "test")
f = File.open("testfile")
f.read #...
...=> "test"
f.close
# f.read # => IOError (すでに close しているので read できない)
//}

@
see IO#closed?, IO#close_read, IO#close_write...

IO#close_write -> nil (137.0)

書き込み用の IO を close します。

...書き込み用の 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 writing
end
//}

@
see IO#close, IO#closed?, IO#close_read...
...se されていた場合には単に無視されます。

@
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...

IO#close -> nil (131.0)

入出力ポートをクローズします。

...す。

@
raise Errno::EXXX close に失敗した場合に発生します。

//emlist[例][ruby]{
IO.write("testfile", "test")
f = File.open("testfile")
f.read # => "test"
f.close
# f.read # => IOError (すでに close しているので read できない)
//}

@
see IO#closed?, IO#close_read, IO#c...

IO#closed? -> bool (131.0)

self が完全に(読み込み用と書き込み用の両方が)クローズされている場合に 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_...

絞り込み条件を変える