種類
- インスタンスメソッド (66)
- モジュール関数 (19)
ライブラリ
- mkmf (22)
-
rdoc
/ context (11) -
rubygems
/ user _ interaction (33) - timeout (19)
クラス
キーワード
-
add
_ class _ or _ module (11) -
check
_ signedness (22) - timeout (19)
検索結果
先頭5件
- Gem
:: StreamUI :: SilentProgressReporter # done -> nil - Gem
:: StreamUI :: SimpleProgressReporter # done -> nil - Gem
:: StreamUI :: VerboseProgressReporter # done -> nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil
-
Gem
:: StreamUI :: SilentProgressReporter # done -> nil (18202.0) -
何もしません。
何もしません。 -
Gem
:: StreamUI :: SimpleProgressReporter # done -> nil (18202.0) -
終了メッセージを表示します。
終了メッセージを表示します。 -
Gem
:: StreamUI :: VerboseProgressReporter # done -> nil (18202.0) -
終了メッセージを表示します。
終了メッセージを表示します。 -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (322.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
...ned, or negative integer if the +type+ is signed.
For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (322.0) -
Returns the signedness of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. If the +type+ is found and is a numeric type, a macro is passed as a preprocessor constant to the compiler using the +type+ name, in uppercase, prepended with 'SIGNEDNESS_OF_', followed by the +type+ name, followed by '=X' where 'X' is positive integer if the +type+ is unsigned, or negative integer if the +type+ is signed. For example, if size_t is defined as unsigned, then check_signedness('size_t') would returned +1 and the SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is done.
...ned, or negative integer if the +type+ is signed.
For example, if size_t is defined as unsigned, then
check_signedness('size_t') would returned +1 and the
SIGNEDNESS_OF_SIZE_T=+1 preprocessor macro would be passed to the
compiler, and SIGNEDNESS_OF_INT=-1 if check_signedness('int') is
done.... -
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (131.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。
また sec が 0 もしくは nil のときは制限時間なしで
ブロックを実行します。
@param sec タイムアウトする時間を秒数で指定します.
@param e......ho $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done
SHELL_EOT
}
File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t) {
# system だととまらない
# system("./loop......id
while line = com.gets
print line
end
}
rescue Timeout::Error => err
puts "timeout: shell execution."
Process.kill('SIGINT', pid)
printf "[result]\t%s", com.read
com.close unless com.nil?
end
#止まっているか確認する。
#system("ps au")... -
RDoc
:: Context # add _ class _ or _ module(collection , class _ type , name , superclass = nil) -> RDoc :: NormalClass | RDoc :: SingleClass | RDoc :: NormalModule (107.0) -
collection に name で指定したクラス、モジュールを追加します。
...の親クラスを RDoc::NormalClass オ
ブジェクトで指定します。
既に登録済みであった場合は、引数で指定した情報で内容を更新します。ただ
し、RDoc::CodeObject#done_documenting が true を返す場合、何も行
われません。... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (31.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...::Error の代わりに
その例外が発生します。
ブロックパラメータ i は sec がはいります。
また sec が 0 もしくは nil のときは制限時間なしで
ブロックを実行します。
@param sec タイムアウトする時間を秒数で指定します.
@param e......ho $x $y $c
if [ $c -eq 1 ]
then
let m1++
else
let m2++
fi
done
SHELL_EOT
}
File.chmod(0755, "loop.sh")
t = 10 # 10 秒でタイムアウト
begin
pid = nil
com = nil
Timeout.timeout(t) {
# system だととまらない
# system("./loop......id
while line = com.gets
print line
end
}
rescue Timeout::Error => err
puts "timeout: shell execution."
Process.kill('SIGINT', pid)
printf "[result]\t%s", com.read
com.close unless com.nil?
end
#止まっているか確認する。
#system("ps au")...