るりまサーチ

最速Rubyリファレンスマニュアル検索!
1834件ヒット [1-100件を表示] (0.044秒)
トップページ > クエリ:nil[x] > モジュール:Kernel[x]

別のキーワード

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

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel.#warn(*message, uplevel: nil, category: nil) -> nil (344.0)

message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。

...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。

文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。

upleve...
...uts(*message) if !$VERBOSE.nil? && !message.empty?
nil

//}

@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイル名と行番号を表示するかを0以上の数値で指定します。 nil の場合は表示しま...
...発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}

//emlist[uplevel の例][ruby]{
def foo
warn("test message", uplevel: 0) # => test.rb:2: warning: test mes...

Kernel#check_signedness(type, headers = nil, opts = nil) -> "signed" | "unsigned" | nil (307.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 (307.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.#warn(*message, uplevel: nil) -> nil (243.0)

message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。

...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。

文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。

upleve...
...uts(*message) if !$VERBOSE.nil? && !message.empty?
nil

//}

@param message 出力するオブジェクトを任意個指定します。
@param uplevel いくつ前の呼び出し元のファイル名と行番号を表示するかを0以上の数値で指定します。 nil の場合は表示しま...
...発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。

//emlist[例][ruby]{
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
//}

//emlist[uplevel の例][ruby]{
def foo
warn("test message", uplevel: 0) # => test.rb:2: warning: test mes...

Kernel.#caller_locations(start = 1, length = nil) -> [Thread::Backtrace::Location] | nil (226.0)

現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。

...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。

@param start 開始フレームの位置を数値で指定します。

@param length 取得するフレームの個数を指定します。

@pa...
...th)
end

def test2(start, length)
test1(start, length)
end

def test3(start, length)
test2(start, length)
end

caller_locations # => []
test3(1, nil)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'", "/Users/user/test.rb:17:in `<main>'"]
# => [9, 13, 17]
# => ["/User...
...(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}

@see Thread::Backtrace::Location, Kernel.#caller...

絞り込み条件を変える

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (211.0)

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

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

例えば、

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

である場合、SIZEOF_MYSTRUCT=12 というプリプロセ...

Kernel#check_sizeof(type, headers = nil) { ... } -> Integer | nil (211.0)

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

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

例えば、

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

である場合、SIZEOF_MYSTRUCT=12 というプリプロセ...

Kernel#have_library(lib, func = nil, headers = nil) -> bool (211.0)

ライブラリ lib がシステムに存在し、関数 func が定義されているかどうかをチェックします。 チェックが成功すれば $libs に lib を追加し true を返します。 チェックが失敗したら false を返します。

...敗したら false を返します。

@param lib ライブラリの名前を指定します。

@param func 検査する関数名を指定します。
nil
または空文字列のときは、"main" になります。

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

Kernel#have_library(lib, func = nil, headers = nil) { ... } -> bool (211.0)

ライブラリ lib がシステムに存在し、関数 func が定義されているかどうかをチェックします。 チェックが成功すれば $libs に lib を追加し true を返します。 チェックが失敗したら false を返します。

...敗したら false を返します。

@param lib ライブラリの名前を指定します。

@param func 検査する関数名を指定します。
nil
または空文字列のときは、"main" になります。

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

Kernel#try_constant(const, headers = nil, opt = "") -> Integer | nil (211.0)

定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。

...定数 const がシステムに存在するかどうか検査します。
Kernel
#have_const を使ってください。

@param const C 言語の定数名を指定します。

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

@param opt コンパイラに渡すオプションを...
...指定します。
$CFLAGS もコンパイラには渡されます。

@return 定数 const がシステムに存在する場合はその値を返します。
定数 const がシステムに存在しない場合は nil を返します。...

絞り込み条件を変える

Kernel#try_constant(const, headers = nil, opt = "") { ... } -> Integer | nil (211.0)

定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。

...定数 const がシステムに存在するかどうか検査します。
Kernel
#have_const を使ってください。

@param const C 言語の定数名を指定します。

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

@param opt コンパイラに渡すオプションを...
...指定します。
$CFLAGS もコンパイラには渡されます。

@return 定数 const がシステムに存在する場合はその値を返します。
定数 const がシステムに存在しない場合は nil を返します。...
<< 1 2 3 ... > >>