るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. csv to_i
  5. matrix i

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

IO#close_write -> nil (32200.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" # => IOEr...
...ror: not opened for writing
end
//}

@see IO#close, IO#closed?, IO#close_read...
... IO を close します。

既に 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...

IO#close -> nil (29200.0)

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

...例外 IOError が発生しま
す。ガーベージコレクトの際にはクローズされていない IO ポートはクロー
ズされます。
self がパイプでプロセスにつながっていれば、そのプロセスの終
了を待ち合わせます。


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

//emlist[例][ruby]{
I
O.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_wri...
...うと例外 IOError が発生しま
す。ガーベージコレクトの際にはクローズされていない IO ポートはクロー
ズされます。
self がパイプでプロセスにつながっていれば、そのプロセスの終
了を待ち合わせます。

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

//emlist[例][ruby]{
I
O.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_writ...

IO#close_read -> nil (29200.0)

読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。

... IO を close します。主にパイプや読み書き両用に作成し
IO オブジェクトで使用します。


@raise IOError 自身が読み込み用にオープンされていなければ発生します。

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

//emlist[...
...例][ruby]{
I
O.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...
... IO を close します。主にパイプや読み書き両用に作成し
IO オブジェクトで使用します。

既に close されていた場合には単に無視されます。

@raise IOError 自身が読み込み用にオープンされていなければ発生します。

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

//emlist[例][ruby]{
I
O.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...

IO#pos -> Integer (29200.0)

ファイルポインタの現在の位置を整数で返します。

...タの現在の位置を整数で返します。

@raise IOError 既に close されている場合に発生します。

//emlist[例][ruby]{
I
O.write("testfile", "This is line one\n")
File.open("testfile") do |f|
f.pos # => 0
f.gets # => "This is line one\n"
f.pos # => 17
end
//}...

IRB::Context#verbose -> bool | nil (29200.0)

標準出力に詳細なメッセージを出力するように設定されているかどうかを返し ます。

...

I
RB::Context#verbose? とは別のメソッドである事に注意してください。

@return 詳細なメッセージを出力するように設定されている場合は true を返
します。そうでない場合は false か nil を返します。

@see IRB::Context#verbose?, IR...
...B::Context#verbose=...

絞り込み条件を変える

IRB::Context#verbose? -> bool | nil (29200.0)

標準出力に詳細なメッセージを出力するかどうかを返します。

...か nil を返します。

設定を行っていた場合(IRB::Context#verbose が true か false を返す
場合)は設定した通りに動作します。設定を行っていない場合は、ファイルを指
定して irb を実行した場合などに true を返します。


@see IRB::Co...
...ntext#verbose, IRB::Context#verbose=...

IO#autoclose=(bool) (29100.0)

auto-close フラグを設定します。

...close フラグを設定します。

フラグが設定されているオブジェクトは
close時/GCでのファイナライザ呼出時にファイルデスクリプタを close します。
偽を設定すると close しません。

@param bool 真偽値でフラグを設定します
@see IO...
...#autoclose?

f = open("/dev/null")
I
O.for_fd(f.fileno)
# ...
f.gets # may cause Errno::EBADF

f = open("/dev/null")
I
O.for_fd(f.fileno).autoclose = false
# ...
f.gets # won't cause Errno::EBADF...

IO#autoclose? -> bool (29100.0)

auto-close フラグを返します。

...auto-close フラグを返します。

//emlist[例][ruby]{
I
O.open(IO.sysopen("testfile")) do |io|
i
o.autoclose? # => true
i
o.autoclose = false
i
o.autoclose? # => false
end
//}

@see IO#autoclose=...

IO#close_on_exec=(bool) (29100.0)

自身に close-on-exec フラグを設定します。

...close-on-exec フラグを設定します。

このフラグをセットすると exec(2) 時にそのファイルデスクリプタを
close します。

@see fcntl(2)
@param bool 自身の close-on-exec フラグを true か false で指定します。

f = open("/dev/null")
f.close_on_ex...
...ec = true
system("cat", "/proc/self/fd/#{f.fileno}") # cat: /proc/self/fd/3: No such file or directory
f.closed? #=> false

@see IO#close_on_exec?...

IO#close_on_exec? -> bool (29100.0)

自身に close-on-exec フラグが設定されていた場合 true を返します。 そうでない場合に false を返します。

...身に close-on-exec フラグが設定されていた場合 true を返します。
そうでない場合に false を返します。

f = open("/dev/null")
f.close_on_exec? #=> true
f.close_on_exec = false
f.close_on_exec? #=> false
f.close_on_exec =...
...true
f.close_on_exec? #=> true

@see IO#close_on_exec=...

絞り込み条件を変える

<< 1 2 3 ... > >>