るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. socket so_no_check
  2. mkmf check_sizeof
  3. mkmf check_signedness
  4. pty check
  5. kernel check_sizeof

検索結果

Net::IMAP#check -> Net::IMAP::TaggedResponse (54355.0)

CHECK コマンドを送り、現在処理しているメールボックスの チェックポイントを要求します。

CHECK コマンドを送り、現在処理しているメールボックスの
チェックポイントを要求します。

チェックポイントの要求とは、サーバ内部で保留状態になっている
操作を完了させることを意味します。例えばメモリ上にあるメールの
データをディスクに書き込むため、fsyncを呼んだりすることです。
実際に何が行なわれるかはサーバの実装によりますし、何も行なわれない
場合もあります。

StringScanner#check(regexp) -> String | nil (54343.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(...

CGI::HtmlExtension#checkbox(name = "", value = nil, checked = nil) -> String (18604.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 (18406.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 (18406.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...

絞り込み条件を変える

JSON::State#check_circular? -> bool (18343.0)

循環参照のチェックを行う場合は、真を返します。 そうでない場合は偽を返します。

循環参照のチェックを行う場合は、真を返します。
そうでない場合は偽を返します。

//emlist[例 ネストをチェックするケース][ruby]{
require "json"

a = [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]...

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (18328.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 (18328.0)

与えられた型のサイズを返します。

与えられた型のサイズを返します。

型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。

例えば、

require 'mkmf'
check_sizeof('mystruct') # => 12

である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。

@param type 検査したい型を指定します。

@param headers 追加のヘッダファイルを指定します。

StringScanner#check_until(regexp) -> String | nil (18325.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...

Gem::Package::TarWriter#check_closed (18307.0)

自身に関連付けられた IO が既に close されているかどうかチェックします。

自身に関連付けられた IO が既に close されているかどうかチェックします。

@raise IOError 自身に関連付けられた IO が既に close されている場合に発
生します。

絞り込み条件を変える

Monitor#mon_check_owner -> nil (18307.0)

MonitorMixin 用の内部メソッドです。

MonitorMixin 用の内部メソッドです。

@raise ThreadError ロックを持っていないスレッドが呼びだした場合に発生します

OpenSSL::OCSP::Request#check_nonce(basic_resp) -> Integer (18307.0)

自身の nonce とレスポンスの nonce が整合しているか チェックします。

自身の nonce とレスポンスの nonce が整合しているか
チェックします。

-1 から 3 までの整数を返します。それぞれの意味は以下の通りです。
* -1 自身にしか nonce が設定されていない
* 0 nonce が自身とレスポンスの両方にあるが等しくない
* 1 nonce が自身とレスポンスの両方にあり等しい
* 2 nonce が自身とレスポンスのどちらにもない
* 3 nonce がレスポンスにしか設定されていない

0 は明らかに不正なので、これは必ずチェックする必要があります。
1 は nonce が正しいということを意味します。
それ以外は、...

OpenSSL::PKey::EC#check_key -> true (18307.0)

パラメータと鍵対をチェックします。

パラメータと鍵対をチェックします。

なんらかの意味で鍵対に問題がある場合には例外 ECError を発生します。

@raise OpenSSL::PKey::ECError 鍵に問題がある場合に発生します

OpenSSL::SSL::SSLSocket#post_connection_check(hostname) -> true (18307.0)

接続後検証を行います。

接続後検証を行います。

検証に成功した場合は true を返し、失敗した場合は例外
OpenSSL::SSL::SSLError を発生させます。

OpenSSL の API では、
OpenSSL::SSL::SSLSocket#connect や OpenSSL::SSL::SSLSocket#accept
での検証は実用的には不完全です。
CA が証明書に署名してそれが失効していないことしか確認しません。
実用上は証明書に記載されている事項を見て、接続先が妥当であるかを確認する
必要があります。通常は接続先ホストの FQDN と証明書に記載されている FQDN が
一致しているか...

OpenSSL::X509::Certificate#check_private_key(private_key) -> bool (18307.0)

与えられた秘密鍵が証明書に記載されている subject の公開鍵と対応するものかを確かめます。

与えられた秘密鍵が証明書に記載されている subject の公開鍵と対応するものかを確かめます。

確認に成功した場合に真を返します。
@param private_key 確認用の秘密鍵

絞り込み条件を変える

CGI::HtmlExtension#checkbox(attributes) -> String (18304.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 (18304.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 (18304.0)

タイプが checkbox である input 要素のグループを生成します。

タイプが checkbox である input 要素のグループを生成します。

生成される input 要素の name 属性はすべて同じになり、
それぞれの input 要素の後ろにはラベルが続きます。

@param name name 属性の値を指定します。

@param values value 属性のリストを指定します。
それぞれの引数が、単純な文字列の場合、value 属性の値とラベルに同じものが使用されます。
それぞれの引数が、二要素または三要素の配列の場合、最終要素が true であれば、
...

Gem::Package::TarHeader#checksum -> Integer (18304.0)

tar のヘッダに含まれるチェックサムを返します。

tar のヘッダに含まれるチェックサムを返します。

Gem::Package::TarHeader#update_checksum (18304.0)

チェックサムを更新します。

チェックサムを更新します。

絞り込み条件を変える

OpenSSL::BN#prime?(checks) -> bool (340.0)

自身が素数であるなら true を返します。

自身が素数であるなら true を返します。

Miller-Rabin 法により確率的に判定します。
checkで指定した回数だけ繰り返します。
引数を省略した場合は OpenSSL が適切な
回数を判断します。

@param check Miller-Robin 法の繰り返しの回数
@raise OpenSSL::BNError 判定時にエラーが発生
@see OpenSSL::BN#prime_fasttest?

CGI::HtmlExtension#radio_button(name = "", value = nil, checked = nil) -> String (304.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" ...

OpenSSL::BN#prime_fasttest?(checks=nil, vtrivdiv=true) -> bool (304.0)

自身が素数であるなら true を返します。

自身が素数であるなら true を返します。

vtrivdiv が真である場合には、 Miller-Rabin 法での
判定の前に小さな素数で割ることで素数か否かを
調べます。自身が小さな素数である場合にはこの手順
により素数ではないと誤った返り値を返します。

Miller-Rabin 法により確率的に判定します。
checksで指定した回数だけ繰り返します。
checksがnilである場合は OpenSSL が適切な
回数を判断します。

//emlist[][ruby]{
require 'openssl'

# 181 は 「小さな素数」である
OpenSSL::BN.new("18...

Object#===(other) -> bool (76.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), ... が実行...

Object#initialize_copy(obj) -> object (76.0)

(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。

(拡張ライブラリによる) ユーザ定義クラスのオブジェクトコピーの初期化メソッド。

このメソッドは self を obj の内容で置き換えます。ただ
し、self のインスタンス変数や特異メソッドは変化しません。
Object#clone, Object#dupの内部で使われています。

initialize_copy は、Ruby インタプリタが知り得ない情報をコピーするた
めに使用(定義)されます。例えば C 言語でクラスを実装する場合、情報
をインスタンス変数に保持させない場合がありますが、そういった内部情
報を initialize_copy でコピーするよう定義しておくことで、du...

絞り込み条件を変える

Exception#backtrace_locations -> [Thread::Backtrace::Location] (58.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
...

Exception#==(other) -> bool (40.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::BN#prime? -> bool (40.0)

自身が素数であるなら true を返します。

自身が素数であるなら true を返します。

Miller-Rabin 法により確率的に判定します。
checkで指定した回数だけ繰り返します。
引数を省略した場合は OpenSSL が適切な
回数を判断します。

@param check Miller-Robin 法の繰り返しの回数
@raise OpenSSL::BNError 判定時にエラーが発生
@see OpenSSL::BN#prime_fasttest?

OpenSSL::SSL::SSLContext#options=(options) (40.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::Store#flags=(flags) (40.0)

CRL に関するフラグを設定します。

CRL に関するフラグを設定します。

以下の定数から必要なものを選んで OR 取り、渡します。
* OpenSSL::X509::V_FLAG_CRL_CHECK
* OpenSSL::X509::V_FLAG_CRL_CHECK_ALL

このフラグは OpenSSL::X509::Store#verify で検証する場合に利用されます。
OpenSSL::X509::StoreContext.new で証明書ストアコンテキストを
生成する場合にはそのコンテキストにフラグがコピーされます。

デフォルトではフラグは設定されていません。

@param flags 設定するフラグ(整...

絞り込み条件を変える

OpenSSL::X509::StoreContext#flags=(flags) (40.0)

CRL に関するフラグを設定します。

CRL に関するフラグを設定します。

以下の定数から必要なものを選んで OR 取り、渡します。
* OpenSSL::X509::V_FLAG_CRL_CHECK
* OpenSSL::X509::V_FLAG_CRL_CHECK_ALL

@param flags 設定するフラグ(整数値)
@see OpenSSL::X509::Store#flags=

StringScanner#scan_full(regexp, s, f) -> object (40.0)

スキャンポインタの位置から regexp と文字列のマッチを試します。

スキャンポインタの位置から regexp と文字列のマッチを試します。

マッチに成功すると、s と f の値によって以下のように動作します。

* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばマッチした部分文字列を返します。
* f が false ならばマッチした部分文字列の長さを返します。

マッチに失敗すると s や f に関係なく nil を返します。

このメソッドは s と f の組み合わせにより、
他のメソッドと同等の動作になります。

*...

StringScanner#search_full(regexp, s, f) -> object (40.0)

regexp で指定された正規表現とマッチするまで文字列をスキャンします。

regexp で指定された正規表現とマッチするまで文字列をスキャンします。

マッチに成功すると、s と f の値によって以下のように動作します。

* s が true ならばスキャンポインタを進めます。
* s が false ならばスキャンポインタを進めません。
* f が true ならばスキャン開始位置からマッチした部分の末尾までの部分文字列を返します。
* f が false ならばスキャン開始位置からマッチした部分の末尾までの部分文字列の長さを返します。

マッチに失敗すると s や f に関係なく nil を返します。

このメソッドは s と ...

BasicSocket#getpeereid -> [Integer, Integer] (22.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 ...

FileUtils#sh(*cmd) {|result, status| ... } (22.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 = #...

絞り込み条件を変える

Module#ruby2_keywords(method_name, ...) -> nil (22.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method 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 method to other methods.

For the given method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword argument...

Proc#ruby2_keywords -> proc (22.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 ...

Socket#connect_nonblock(server_sockaddr) -> 0 (22.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
...

WIN32OLE#ole_query_interface(iid) -> WIN32OLE (22.0)

IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを 持つオブジェクトを取得します。

IID(インターフェイスID)を指定してオブジェクトの別のインターフェイスを
持つオブジェクトを取得します。

オブジェクトが複数のオートメーション用インターフェイスを持つ場合に、当
メソッドを利用して既定のインターフェイスとは異なるインターフェイスを取
得します。

@param iid 取得するインターフェイスのIIDを文字列で指定します。
@return iidパラメータで指定したインターフェイスを持つWIN32OLEオブジェクト
@raise WIN32OLERuntimeError 指定したIIDをオブジェクトが持たない場合に通知されます。

ie = WIN32OLE.n...