ライブラリ
クラス
- BasicSocket (1)
- Exception (2)
-
Gem
:: Package :: TarHeader (2) -
Gem
:: Package :: TarWriter (1) -
JSON
:: State (1) - Monitor (1)
-
Net
:: IMAP (1) - Object (2)
-
OpenSSL
:: BN (2) -
OpenSSL
:: OCSP :: Request (1) -
OpenSSL
:: PKey :: EC (1) -
OpenSSL
:: SSL :: SSLContext (1) -
OpenSSL
:: SSL :: SSLSocket (1) -
OpenSSL
:: X509 :: Certificate (1) -
OpenSSL
:: X509 :: StoreContext (1) - Proc (1)
- Socket (1)
- StringScanner (4)
- WIN32OLE (1)
モジュール
-
CGI
:: HtmlExtension (5) - FileUtils (1)
- Kernel (4)
キーワード
- == (1)
- === (1)
-
backtrace
_ locations (1) -
check
_ circular? (1) -
check
_ closed (1) -
check
_ key (1) -
check
_ nonce (1) -
check
_ private _ key (1) -
check
_ signedness (2) -
check
_ sizeof (2) -
check
_ until (1) - checkbox (2)
-
checkbox
_ group (2) - checksum (1)
-
connect
_ nonblock (1) - flags= (1)
- getpeereid (1)
-
initialize
_ copy (1) -
mon
_ check _ owner (1) -
ole
_ query _ interface (1) -
post
_ connection _ check (1) - prime? (1)
-
prime
_ fasttest? (1) -
ruby2
_ keywords (1) -
scan
_ full (1) -
search
_ full (1) - sh (1)
-
update
_ checksum (1)
検索結果
先頭5件
-
Net
:: IMAP # check -> Net :: IMAP :: TaggedResponse (72655.0) -
CHECK コマンドを送り、現在処理しているメールボックスの チェックポイントを要求します。
CHECK コマンドを送り、現在処理しているメールボックスの
チェックポイントを要求します。
チェックポイントの要求とは、サーバ内部で保留状態になっている
操作を完了させることを意味します。例えばメモリ上にあるメールの
データをディスクに書き込むため、fsyncを呼んだりすることです。
実際に何が行なわれるかはサーバの実装によりますし、何も行なわれない
場合もあります。 -
StringScanner
# check(regexp) -> String | nil (72643.0) -
現在位置から regexp とのマッチを試みます。 マッチに成功したらマッチした部分文字列を返します。 マッチに失敗したら nil を返します。
現在位置から regexp とのマッチを試みます。
マッチに成功したらマッチした部分文字列を返します。
マッチに失敗したら nil を返します。
このメソッドはマッチが成功してもスキャンポインタを進めません。
@param regexp マッチに用いる正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.check(/\w+/) # => "test"
s.pos # => 0
s.matched # => "test"
s.check(... -
OpenSSL
:: SSL :: SSLSocket # post _ connection _ check(hostname) -> true (45625.0) -
接続後検証を行います。
接続後検証を行います。
検証に成功した場合は true を返し、失敗した場合は例外
OpenSSL::SSL::SSLError を発生させます。
OpenSSL の API では、
OpenSSL::SSL::SSLSocket#connect や OpenSSL::SSL::SSLSocket#accept
での検証は実用的には不完全です。
CA が証明書に署名してそれが失効していないことしか確認しません。
実用上は証明書に記載されている事項を見て、接続先が妥当であるかを確認する
必要があります。通常は接続先ホストの FQDN と証明書に記載されている FQDN が
一致しているか... -
Gem
:: Package :: TarWriter # check _ closed (45607.0) -
自身に関連付けられた IO が既に close されているかどうかチェックします。
自身に関連付けられた IO が既に close されているかどうかチェックします。
@raise IOError 自身に関連付けられた IO が既に close されている場合に発
生します。 -
Gem
:: Package :: TarHeader # checksum -> Integer (45604.0) -
tar のヘッダに含まれるチェックサムを返します。
tar のヘッダに含まれるチェックサムを返します。 -
Gem
:: Package :: TarHeader # update _ checksum (45604.0) -
チェックサムを更新します。
チェックサムを更新します。 -
CGI
:: HtmlExtension # checkbox(name = "" , value = nil , checked = nil) -> String (37204.0) -
タイプが checkbox である input 要素を生成します。
タイプが checkbox である input 要素を生成します。
@param name name 属性の値を指定します。
@param value value 属性の値を指定します。
@param checked checked 属性の値を指定します。
例:
checkbox("name", "value", true)
# => "<INPUT CHECKED NAME=\"name\" TYPE=\"checkbox\" VALUE=\"value\">" -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (36706.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.
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... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil (36706.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.
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... -
Monitor
# mon _ check _ owner -> nil (36655.0) -
MonitorMixin 用の内部メソッドです。
MonitorMixin 用の内部メソッドです。
@raise ThreadError ロックを持っていないスレッドが呼びだした場合に発生します -
JSON
:: State # check _ circular? -> bool (36643.0) -
循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。
循環参照のチェックを行う場合は、真を返します。
そうでない場合は偽を返します。
//emlist[例 ネストをチェックするケース][ruby]{
require "json"
a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]... -
Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil (36628.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (36628.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
OpenSSL
:: OCSP :: Request # check _ nonce(basic _ resp) -> Integer (36625.0) -
自身の nonce とレスポンスの nonce が整合しているか チェックします。
自身の nonce とレスポンスの nonce が整合しているか
チェックします。
-1 から 3 までの整数を返します。それぞれの意味は以下の通りです。
* -1 自身にしか nonce が設定されていない
* 0 nonce が自身とレスポンスの両方にあるが等しくない
* 1 nonce が自身とレスポンスの両方にあり等しい
* 2 nonce が自身とレスポンスのどちらにもない
* 3 nonce がレスポンスにしか設定されていない
0 は明らかに不正なので、これは必ずチェックする必要があります。
1 は nonce が正しいということを意味します。
それ以外は、... -
StringScanner
# check _ until(regexp) -> String | nil (36625.0) -
regexp が一致するまで文字列をスキャンします。 マッチに成功したらスキャン開始位置からマッチ部分の末尾までの部分文字列を返します。 マッチに失敗したら nil を返します。
regexp が一致するまで文字列をスキャンします。
マッチに成功したらスキャン開始位置からマッチ部分の末尾までの部分文字列を返します。
マッチに失敗したら nil を返します。
このメソッドはマッチが成功してもスキャンポインタを進めません。
@param regexp マッチに用いる正規表現を指定します。
//emlist[例][ruby]{
require 'strscan'
s = StringScanner.new('test string')
s.check_until(/str/) # => "test str"
s.matched # => "str... -
OpenSSL
:: PKey :: EC # check _ key -> true (36607.0) -
パラメータと鍵対をチェックします。
パラメータと鍵対をチェックします。
なんらかの意味で鍵対に問題がある場合には例外 ECError を発生します。
@raise OpenSSL::PKey::ECError 鍵に問題がある場合に発生します -
OpenSSL
:: X509 :: Certificate # check _ private _ key(private _ key) -> bool (36607.0) -
与えられた秘密鍵が証明書に記載されている subject の公開鍵と対応するものかを確かめます。
与えられた秘密鍵が証明書に記載されている subject の公開鍵と対応するものかを確かめます。
確認に成功した場合に真を返します。
@param private_key 確認用の秘密鍵 -
CGI
:: HtmlExtension # checkbox(attributes) -> String (36604.0) -
タイプが checkbox である input 要素を生成します。
タイプが checkbox である input 要素を生成します。
@param attributes 属性をハッシュで指定します。
例:
checkbox("name" => "name", "value" => "value", "checked" => true)
# => "<INPUT checked name=\"name\" TYPE=\"checkbox\" value=\"value\">" -
CGI
:: HtmlExtension # checkbox _ group(attributes) -> String (36604.0) -
タイプが checkbox である input 要素のグループを生成します。
タイプが checkbox である input 要素のグループを生成します。
生成される input 要素の name 属性はすべて同じになり、
それぞれの input 要素の後ろにはラベルが続きます。
@param attributes 属性をハッシュで指定します。
例:
checkbox_group({ "NAME" => "name",
"VALUES" => ["foo", "bar", "baz"] })
checkbox_group({ "NAME" => "name",
"VALUES"... -
CGI
:: HtmlExtension # checkbox _ group(name = "" , *values) -> String (36604.0) -
タイプが checkbox である input 要素のグループを生成します。
タイプが checkbox である input 要素のグループを生成します。
生成される input 要素の name 属性はすべて同じになり、
それぞれの input 要素の後ろにはラベルが続きます。
@param name name 属性の値を指定します。
@param values value 属性のリストを指定します。
それぞれの引数が、単純な文字列の場合、value 属性の値とラベルに同じものが使用されます。
それぞれの引数が、二要素または三要素の配列の場合、最終要素が true であれば、
... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (27706.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
バックトレース情報を返します。Exception#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
... -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (27340.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
ソケットをノンブロッキングモードに設定した後、
connect(2) を呼び出します。
引数、返り値は Socket#connect と同じです。
connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。
# Pull down Google's web page
require 'socket'
include Socket::Constants
... -
StringScanner
# scan _ full(regexp , s , f) -> object (27340.0) -
スキャンポインタの位置から regexp と文字列のマッチを試します。
スキャンポインタの位置から regexp と文字列のマッチを試します。
マッチに成功すると、s と f の値によって以下のように動作します。
* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばマッチした部分文字列を返します。
* f が false ならばマッチした部分文字列の長さを返します。
マッチに失敗すると s や f に関係なく nil を返します。
このメソッドは s と f の組み合わせにより、
他のメソッドと同等の動作になります。
*... -
Object
# initialize _ copy(obj) -> object (18466.0) -
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。
このメソッドは self を obj の内容で置き換えます。ただ
し、self のインスタンス変数や特異メソッドは変化しません。
デフォルトでは、Object#clone の内部で Object#initialize_clone から、
また Object#dup の内部で Object#initialize_dup から呼ばれます。
initialize_copy は、Ruby インタプリタが知り得ない情報をコピーするた
めに使用(定義)されます。例えば C 言語でクラスを実装する場合、情報
をインスタ... -
WIN32OLE
# ole _ query _ interface(iid) -> WIN32OLE (18412.0) -
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。
IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。
オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のインターフェイスとは異なるインターフェイスを取
得します。
@param iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。
ie = WIN32OLE.n... -
StringScanner
# search _ full(regexp , s , f) -> object (18340.0) -
regexp で指定された正規表現とマッチするまで文字列をスキャンします。
regexp で指定された正規表現とマッチするまで文字列をスキャンします。
マッチに成功すると、s と f の値によって以下のように動作します。
* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばスキャン開始位置からマッチした部分の末尾までの部分文字列を返します。
* f が false ならばスキャン開始位置からマッチした部分の末尾までの部分文字列の長さを返します。
マッチに失敗すると s や f に関係なく nil を返します。
このメソッドは s と ... -
CGI
:: HtmlExtension # radio _ button(name = "" , value = nil , checked = nil) -> String (9604.0) -
タイプが radio である input 要素を生成します。
タイプが radio である input 要素を生成します。
@param name name 属性の値を指定します。
@param value value 属性の値を指定します。
@param checked 真ならば checked 属性を設定します。
例:
radio_button("name", "value")
# <INPUT TYPE="radio" NAME="name" VALUE="value">
radio_button("name", "value", true)
# <INPUT TYPE="radio" NAME="name" ... -
Proc
# ruby2 _ keywords -> proc (9322.0) -
Marks the proc as passing keywords through a normal argument splat. This should only be called on procs that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the proc such that if the proc is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the proc to other methods.
Marks the proc as passing keywords through a normal argument splat. This
should only be called on procs that accept an argument splat (`*args`)
but not explicit keywords or a keyword splat. It marks the proc such
that if the proc is called with keyword arguments, the final hash
argument is marked ... -
Object
# ===(other) -> bool (9076.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
このメソッドは case 式での振る舞いを考慮して、
各クラスの性質に合わせて再定義すべきです。
デフォルトでは内部で Object#== を呼び出します。
when 節の式をレシーバーとして === を呼び出すことに注意してください。
また Enumerable#grep でも使用されます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12), ... が実行... -
Exception
# ==(other) -> bool (9040.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。
自身と異なるクラスのオブジェクトを指定した場合は
Exception#exception を実行して変換を試みます。
//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if D... -
OpenSSL
:: SSL :: SSLContext # options=(options) (9040.0) -
オプションを設定します。
オプションを設定します。
以下の値の OR で指定します。
* OpenSSL::SSL::OP_ALL
* OpenSSL::SSL::OP_CIPHER_SERVER_PREFERENCE
* OpenSSL::SSL::OP_EPHEMERAL_RSA
* OpenSSL::SSL::OP_NETSCAPE_CA_DN_BUG
* OpenSSL::SSL::OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
* OpenSSL::SSL::OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
* OpenSS... -
OpenSSL
:: X509 :: StoreContext # flags=(flags) (9040.0) -
CRL に関するフラグを設定します。
CRL に関するフラグを設定します。
以下の定数から必要なものを選んで OR 取り、渡します。
* OpenSSL::X509::V_FLAG_CRL_CHECK
* OpenSSL::X509::V_FLAG_CRL_CHECK_ALL
@param flags 設定するフラグ(整数値)
@see OpenSSL::X509::Store#flags= -
BasicSocket
# getpeereid -> [Integer , Integer] (9022.0) -
Unix ドメインソケットにおいて接続相手の euid と egid を 返します。
Unix ドメインソケットにおいて接続相手の euid と egid を
返します。
配列の最初の要素が euid, 2番目の要素が egid です。
ソケットが Unix ドメインソケットでない場合の返り値は
不定です。
require 'socket'
Socket.unix_server_loop("/tmp/sock") {|s|
begin
euid, egid = s.getpeereid
# Check the connected client is myself or not.
next if euid ... -
OpenSSL
:: BN # prime?(checks) -> bool (640.0) -
自身が素数であるなら true を返します。
自身が素数であるなら true を返します。
Miller-Rabin 法により確率的に判定します。
checkで指定した回数だけ繰り返します。
引数を省略した場合は OpenSSL が適切な
回数を判断します。
@param check Miller-Robin 法の繰り返しの回数
@raise OpenSSL::BNError 判定時にエラーが発生
@see OpenSSL::BN#prime_fasttest? -
OpenSSL
:: BN # prime _ fasttest?(checks=nil , vtrivdiv=true) -> bool (604.0) -
自身が素数であるなら true を返します。
自身が素数であるなら true を返します。
vtrivdiv が真である場合には、 Miller-Rabin 法での
判定の前に小さな素数で割ることで素数か否かを
調べます。自身が小さな素数である場合にはこの手順
により素数ではないと誤った返り値を返します。
Miller-Rabin 法により確率的に判定します。
checksで指定した回数だけ繰り返します。
checksがnilである場合は OpenSSL が適切な
回数を判断します。
//emlist[][ruby]{
require 'openssl'
# 181 は 「小さな素数」である
OpenSSL::BN.new("18... -
FileUtils
# sh(*cmd) {|result , status| . . . } (322.0) -
与えられたコマンドを実行します。
与えられたコマンドを実行します。
与えられた引数が複数の場合、シェルを経由しないでコマンドを実行します。
@param cmd 引数の解釈に関しては Kernel.#exec を参照してください。
例:
sh %{ls -ltr}
sh 'ls', 'file with spaces'
# check exit status after command runs
sh %{grep pattern file} do |ok, res|
if ! ok
puts "pattern not found (status = #...