42件ヒット
[1-42件を表示]
(0.029秒)
種類
- インスタンスメソッド (31)
- 文書 (11)
クラス
- CGI (22)
-
Thread
:: Queue (9)
キーワード
- header (11)
- out (11)
-
ruby 1
. 6 feature (11)
検索結果
先頭4件
-
ruby 1
. 6 feature (23306.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...00019>))
: 2002-09-11: Queue#((<Queue/pop>))
Queue#pop に競合状態の問題がありました ((<ruby-dev:17223>))
: 2002-09-11: SizedQueue.new
引数に 0 以下を受けつけるバグが修正されました。
: 2002-09-05: ((<リテラル/式展開>))
stable snapshot で、一......ruby 1.6.8 (2002-10-04) [i586-linux]
""
=> -:1: parse error
ruby 1.7.3 (2002-10-04) [i586-linux]
: SizedQueue#deq, #shift
: SizedQueue#enq
追加(push, pop の別名)。これらが定義されていなかったため、enq などを
呼び出したときスー......IO#close
双方向のパイプの 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_w... -
Thread
:: Queue # close -> self (18175.0) -
キューを close します。close 済みのキューを再度 open することはできません。
...キューを close します。close 済みのキューを再度 open することはできません。
close 後は以下のように動作します。
* Thread::Queue#closed? は true を返します
* Thread::Queue#close は無視されます
* Thread::Queue#enq/push/<< は ClosedQueueError......場合は Thread::Queue#deq/pop/shift は通常通りオブジェクトを返します
また、ClosedQueueError は StopIteration を継承しているため、
close する事でループから脱出する事もできます。
例:
q = Queue.new
Thread.new{
while e = q.deq # wait for ni......l to break loop
# ...
end
}
q.close... -
CGI
# header(options = "text / html") -> String (18.0) -
HTTP ヘッダを options に従って生成します。 CGI#out と違い、標準出力には出力しません。 CGI#out を使わずに自力で HTML を出力したい場合などに使います。 このメソッドは文字列エンコーディングを変換しません。
...= "200 OK"
# "status" => "200 GOOD",
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; charset......ie2],
"my_header1" => "my_value",
"my_header2" => "my_value"})
例:
cgi = CGI.new('html3')
print cgi.header({"charset" => "shift_jis", "status" => "OK"})
print "<html><head><title>TITLE</title></head>\r\n"
print "<body>BODY</body></h... -
CGI
# out(options = "text / html") { . . . . } (18.0) -
HTTP ヘッダと、ブロックで与えられた文字列を標準出力に出力します。
...jp"・"euc-jp"・"shift_jis" のいずれかで
ある場合は文字列エンコーディングを自動変換し、language を "ja"にします。
@param options Hash か文字列で HTTP ヘッダを生成するための情報を指定します。
例:
cgi = CGI.new
cgi.out{......e,
"status" => "OK", # == "200 OK"
"server" => ENV['SERVER_SOFTWARE'],
"connection" => "close",
"type" => "text/html",
"charset" => "iso-2022-jp",
# Content-Type: text/html; char...