るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. _builtin nil?
  2. object nil?
  3. nilclass nil?
  4. object nil
  5. _builtin nil

ライブラリ

クラス

モジュール

検索結果

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

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (19324.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 (19324.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...

CGI::HtmlExtension#checkbox(name = "", value = nil, checked = nil) -> String (19210.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_sizeof(type, headers = nil) -> Integer | nil (18958.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 (18958.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 (18676.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...

Monitor#mon_check_owner -> nil (18610.0)

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

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

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

CGI::HtmlExtension#checkbox(attributes) -> String (18310.0)

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

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

@param attributes 属性をハッシュで指定します。

例:
checkbox("name" => "name", "value" => "value", "checked" => true)
# => "<INPUT checked name=\"name\" TYPE=\"checkbox\" value=\"value\">"

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

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

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

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

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

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

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

Module#ruby2_keywords(method_name, ...) -> nil (325.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...

StringScanner#scan_full(regexp, s, f) -> object (58.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 (58.0)

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

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

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

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

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

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

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

絞り込み条件を変える