308件ヒット
[1-100件を表示]
(0.059秒)
種類
- 特異メソッド (220)
- インスタンスメソッド (66)
- 文書 (22)
キーワード
- close (11)
-
close
_ read (11) - closed? (11)
- open (44)
- popen (154)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) - tcp (22)
検索結果
先頭5件
-
CSV
# close _ write -> nil (18224.0) -
IO#close_write に委譲します。
...IO#close_write に委譲します。
@see IO#close_write... -
IO
# close _ write -> nil (18208.0) -
書き込み用の IO を close します。
...ンされていなければ発生します。
@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... -
StringIO
# close _ write -> nil (18202.0) -
自身に対する書き込みを禁止します。
自身に対する書き込みを禁止します。
@raise IOError 自身がすでに書き込み不可だった場合に発生します。 -
Socket
. tcp(host , port , local _ host=nil , local _ port=nil , connect _ timeout: nil) -> Socket (312.0) -
TCP/IP で host:port に接続するソケットオブジェクトを作成します。
...返した値です。
ブロックなしで呼ばれた場合はソケットオブジェクトを返します。
require 'socket'
Socket.tcp("www.ruby-lang.org", 80) {|sock|
sock.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
sock.close_write
puts sock.read
}... -
Socket
. tcp(host , port , local _ host=nil , local _ port=nil , connect _ timeout: nil) {|socket| . . . } -> object (312.0) -
TCP/IP で host:port に接続するソケットオブジェクトを作成します。
...返した値です。
ブロックなしで呼ばれた場合はソケットオブジェクトを返します。
require 'socket'
Socket.tcp("www.ruby-lang.org", 80) {|sock|
sock.print "GET / HTTP/1.0\r\nHost: www.ruby-lang.org\r\n\r\n"
sock.close_write
puts sock.read
}... -
ruby 1
. 6 feature (282.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
... nil
を返すようになりました。(String#[]やString#slice と同じ結果を返すと
いうことです)
p "foo".slice!("bar") # <- 以前からこちらは nil を返していた
p "foo".slice!(5,10)
=> ruby 1.6.7 (2002-03-01) [i586-linux]
nil......: index 5 out of string (IndexError)
from -:2
=> ruby 1.6.7 (2002-08-01) [i586-linux]
nil
nil
: 2002-07-05 String#split
最初の引数に nil を指定できるようになりました。((<ruby-talk:43513>))
この場合、$; を分割文字列......パイプの dup を close_write するとエラーになっていました。
((<ruby-dev:17155>))
open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duple... -
CSV
. open(filename , mode = "rb" , options = Hash . new) {|csv| . . . } -> nil (108.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...ジェクトは多くのメソッドを IO や File に委譲します。
* IO#binmode
* IO#binmode?
* 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#intern... -
CSV
. open(filename , options = Hash . new) {|csv| . . . } -> nil (108.0) -
このメソッドは IO オブジェクトをオープンして CSV でラップします。 これは CSV ファイルを書くための主要なインターフェイスとして使うことを意図しています。
...ジェクトは多くのメソッドを IO や File に委譲します。
* IO#binmode
* IO#binmode?
* 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#intern... -
IO
# close -> nil (107.0) -
入出力ポートをクローズします。
...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......se 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#close_write... -
IO
# close _ read -> nil (107.0) -
読み込み用の IO を close します。主にパイプや読み書き両用に作成し た IO オブジェクトで使用します。
...オープンされていなければ発生します。
@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...