別のキーワード
種類
- インスタンスメソッド (34)
- モジュール関数 (12)
キーワード
- Array (1)
-
_ _ callee _ _ (1) -
_ _ method _ _ (1) -
check
_ signedness (2) -
check
_ sizeof (2) -
convertible
_ int (2) -
depend
_ rules (1) - fail (1)
-
find
_ library (2) -
find
_ type (2) -
global
_ variables (1) -
have
_ struct _ member (2) -
have
_ type (2) -
local
_ variables (1) -
psych
_ y (1) - raise (1)
- system (4)
-
try
_ compile (2) -
try
_ constant (2) -
try
_ cpp (2) -
try
_ do (2) -
try
_ link (2) -
try
_ run (2) -
try
_ static _ assert (2) -
try
_ type (2) - xsystem (1)
検索結果
先頭5件
-
Kernel
# y(*objects) -> String (63382.0) -
objects を YAML document に変換します。
objects を YAML document に変換します。
このメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてください。
@param objects YAML document に変換する Ruby のオブジェクト -
Kernel
. # p(*arg) -> object | Array (54661.0) -
引数を人間に読みやすい形に整形して改行と順番に標準出力 $stdout に出力します。主にデバッグに使用します。
...された引数 arg を返します。複数の引数が指定された場合はそれらを要素とする配列を返します。
//emlist[例][ruby]{
puts "" #=> (空行)
p "" #=> ""
puts 50,"50"
#=> 50
#=> 50
p 50,"50"
#=> 50
#=> "50"
//}
@see Object#inspect,Kernel.#puts,Kernel.#print... -
Kernel
# find _ type(type , opt , *headers) -> Array (37204.0) -
静的な型 type がシステムに存在するかどうか検査します。
...な型 type がシステムに存在するかどうか検査します。
@param type 検査したい型の名前を指定します。
@param opt コンパイラに渡す追加のオプションを指定します。
@param headers 追加のヘッダを指定します。
@see Kernel#have_type... -
Kernel
# find _ type(type , opt , *headers) { . . . } -> Array (37204.0) -
静的な型 type がシステムに存在するかどうか検査します。
...な型 type がシステムに存在するかどうか検査します。
@param type 検査したい型の名前を指定します。
@param opt コンパイラに渡す追加のオプションを指定します。
@param headers 追加のヘッダを指定します。
@see Kernel#have_type... -
Kernel
# have _ type(type , headers = nil , opt = "") -> bool (37204.0) -
静的な型 type がシステムに存在するかどうか検査します。
静的な型 type がシステムに存在するかどうか検査します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DHAVE_type" を追加し、真を返します。型 type がシステムに存在しない場
合は、偽を返します。
例えば、
require 'mkmf'
have_type('foo') # => true
である場合、HAVE_TYPE_FOO をというプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型の名前を指定します。
@param headers 追加のヘッダを指定します。
@param opt ... -
Kernel
# have _ type(type , headers = nil , opt = "") { . . . } -> bool (37204.0) -
静的な型 type がシステムに存在するかどうか検査します。
静的な型 type がシステムに存在するかどうか検査します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DHAVE_type" を追加し、真を返します。型 type がシステムに存在しない場
合は、偽を返します。
例えば、
require 'mkmf'
have_type('foo') # => true
である場合、HAVE_TYPE_FOO をというプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型の名前を指定します。
@param headers 追加のヘッダを指定します。
@param opt ... -
Kernel
# try _ type(type , headers = nil , opt = "") -> bool (36904.0) -
Kernel#have_type を使ってください。
...
Kernel#have_type を使ってください。
@param type 検査したい型の名前を指定します。
@param headers 追加のヘッダを指定します。
@param opt コンパイラに渡す追加のオプションを指定します。... -
Kernel
# try _ type(type , headers = nil , opt = "") { . . . } -> bool (36904.0) -
Kernel#have_type を使ってください。
...
Kernel#have_type を使ってください。
@param type 検査したい型の名前を指定します。
@param headers 追加のヘッダを指定します。
@param opt コンパイラに渡す追加のオプションを指定します。... -
Kernel
# psych _ y(*objects) -> String (36682.0) -
objects を YAML document に変換します。
objects を YAML document に変換します。
このメソッドは irb 上でのみ定義されます。
syck に y メソッドがあるため、
psych_y が別名として定義されています。将来的に
syck が廃止された場合 psych_y は廃止
される予定であるため、特別の事情がない限り y を用いてください。
@param objects YAML document に変換する Ruby のオブジェクト -
Kernel
# try _ compile(src , opt = "" , *opts) -> bool (36604.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
与えられた C のソースコードがコンパイルできた場合は真を返します。
コンパイルできなかった場合は偽を返します。
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ compile(src , opt = "" , *opts) { . . . } -> bool (36604.0) -
与えられた C のソースコードがコンパイルできた場合は真を返します。 コンパイルできなかった場合は偽を返します。
与えられた C のソースコードがコンパイルできた場合は真を返します。
コンパイルできなかった場合は偽を返します。
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ cpp(src , opt = "" , *opts) -> bool (36604.0) -
C プログラムのソースコード src をプリプロセスします。
C プログラムのソースコード src をプリプロセスします。
$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。
このメソッドはヘッダファイルの存在チェックなどに使用します。
@param src C プログラムのソースコードを指定します。
@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。
@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。
例:
require 'mkmf'
if try_cpp("#in... -
Kernel
# try _ cpp(src , opt = "" , *opts) { . . . } -> bool (36604.0) -
C プログラムのソースコード src をプリプロセスします。
C プログラムのソースコード src をプリプロセスします。
$CPPFLAGS, $CFLAGS の値もプリプロセッサにコマンドライン引数
として渡します。
このメソッドはヘッダファイルの存在チェックなどに使用します。
@param src C プログラムのソースコードを指定します。
@param opt プリプロセッサにコマンドライン引数として渡す値を指定します。
@return 問題なくプリプロセスできたら true を返します。
プリプロセスに失敗したら false を返します。
例:
require 'mkmf'
if try_cpp("#in... -
Kernel
# depend _ rules(depend) -> Array (18904.0) -
ファイルの依存関係の書かれた depend ファイルの内容を処理します。
ファイルの依存関係の書かれた depend ファイルの内容を処理します。
@param depend depend ファイルの内容を指定します。
@return 見つかった依存関係を Makefile 形式で返します。 -
Kernel
# try _ link(src , opt = "" , *options) -> bool (18904.0) -
C プログラムのソースコード src をコンパイル、リンクします。
C プログラムのソースコード src をコンパイル、リンクします。
このメソッドは $CFLAGS と $LDFLAGS の値もコンパイラまたはリ
ンカに渡します。
問題なくリンクできたら true を返します。
コンパイルとリンクに失敗したら false を返します。
@param src C プログラムのソースコードを指定します。
@param opt リンカにコマンド引数として渡す値を指定します。
例:
require 'mkmf'
if try_link("int main() { sin(0.0); }", '-lm')
$stderr.puts "si... -
Kernel
# try _ link(src , opt = "" , *options) { . . . } -> bool (18904.0) -
C プログラムのソースコード src をコンパイル、リンクします。
C プログラムのソースコード src をコンパイル、リンクします。
このメソッドは $CFLAGS と $LDFLAGS の値もコンパイラまたはリ
ンカに渡します。
問題なくリンクできたら true を返します。
コンパイルとリンクに失敗したら false を返します。
@param src C プログラムのソースコードを指定します。
@param opt リンカにコマンド引数として渡す値を指定します。
例:
require 'mkmf'
if try_link("int main() { sin(0.0); }", '-lm')
$stderr.puts "si... -
Kernel
# find _ library(lib , func , *paths) -> bool (18604.0) -
関数 func が定義されたライブラリ lib を探します。
...査してもライブラリ lib が見つからないときは、
変数を変更せず false を返します。
paths を指定しないときは Kernel#have_library と同じ動作です。
@param lib ライブラリ名を指定します。
@param func 関数名を指定します。... -
Kernel
# find _ library(lib , func , *paths) { . . . } -> bool (18604.0) -
関数 func が定義されたライブラリ lib を探します。
...査してもライブラリ lib が見つからないときは、
変数を変更せず false を返します。
paths を指定しないときは Kernel#have_library と同じ動作です。
@param lib ライブラリ名を指定します。
@param func 関数名を指定します。... -
Kernel
# try _ constant(const , headers = nil , opt = "") -> Integer | nil (18604.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
...定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを... -
Kernel
# try _ constant(const , headers = nil , opt = "") { . . . } -> Integer | nil (18604.0) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
...定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを... -
Kernel
# try _ do(src , command , *opts) -> () (18604.0) -
@param src C プログラムのソースコードを指定します。
...aram src C プログラムのソースコードを指定します。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
@raise RuntimeError 開発環境がインストールされていない場合に発生します。
@see Kernel#xsystem... -
Kernel
# try _ do(src , command , *opts) { . . . } -> () (18604.0) -
@param src C プログラムのソースコードを指定します。
...aram src C プログラムのソースコードを指定します。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。
@raise RuntimeError 開発環境がインストールされていない場合に発生します。
@see Kernel#xsystem... -
Kernel
# try _ run(src , opt = "") -> bool | nil (18604.0) -
与えられたソースコードが、コンパイルやリンクできるかどうか検査します。
与えられたソースコードが、コンパイルやリンクできるかどうか検査します。
以下の全ての検査に成功した場合は、真を返します。そうでない場合は偽を返します。
* src が C のソースとしてコンパイルできるか
* 生成されたオブジェクトが依存しているライブラリとリンクできるか
* リンクしたファイルが実行可能かどうか
* 実行ファイルがきちんと存在しているかどうか
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt リンカに渡す... -
Kernel
# try _ run(src , opt = "") { . . . } -> bool | nil (18604.0) -
与えられたソースコードが、コンパイルやリンクできるかどうか検査します。
与えられたソースコードが、コンパイルやリンクできるかどうか検査します。
以下の全ての検査に成功した場合は、真を返します。そうでない場合は偽を返します。
* src が C のソースとしてコンパイルできるか
* 生成されたオブジェクトが依存しているライブラリとリンクできるか
* リンクしたファイルが実行可能かどうか
* 実行ファイルがきちんと存在しているかどうか
ブロックを与えた場合、そのブロックはコンパイル前に評価されます。
ブロック内でソースコードを変更することができます。
@param src C のソースコードを指定します。
@param opt リンカに渡す... -
Kernel
# try _ static _ assert(expr , headers = nil , opt = "") -> bool (18604.0) -
@todo ???
@todo ???
...
@param expr C 言語の式を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# try _ static _ assert(expr , headers = nil , opt = "") { . . . } -> bool (18604.0) -
@todo ???
@todo ???
...
@param expr C 言語の式を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを指定します。
$CFLAGS もコンパイラには渡されます。 -
Kernel
# xsystem(command , opts = nil) -> () (18604.0) -
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
...
Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。
@param command コマンドを指定します。
@param opts オプションを Hash で指定します。......:werror というキーに真を指定すると
@see Kernel.#system... -
Kernel
. # system(command , options={}) -> bool | nil (18604.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , command , options={}) -> bool | nil (18604.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...文字列で指定します。
@param env 更新する環境変数を表す Hash
@param options オプションパラメータ Hash
//emlist[シェル経由でコマンドを実行][ruby]{
system("echo *") # => true
# fileA fileB fileC ...
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(env , program , *args , options={}) -> bool | nil (18604.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...umask
* 子プロセスでのリダイレクト
などを変更できます。環境変数のクリアなども指定できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # system(program , *args , options={}) -> bool | nil (18604.0) -
引数を外部コマンドとして実行して、成功した時に真を返します。
...umask
* 子プロセスでのリダイレクト
などを変更できます。環境変数のクリアなども指定できます。
詳しくは Kernel.#spawn を参照してください。
=== 引数の解釈
この形式で呼び出した場合、空白や shell のメタキャラクタも......s オプションパラメータ Hash
@raise ArgumentError 第一引数が配列かつ要素数が 2 でない場合に発生します。
//emlist[インタプリタから直接コマンドを実行][ruby]{
system("echo", "*") # => true
# *
//}
@see Kernel.#`,Kernel.#spawn,Kernel.#exec,system(3)... -
Kernel
. # Array(arg) -> Array (18358.0) -
引数を配列(Array)に変換した結果を返します。
引数を配列(Array)に変換した結果を返します。
arg.to_ary と arg.to_a をこの順に呼び出して、返ってきた配列を変換結果とします。
arg に to_ary, to_a のいずれのメソッドも定義されていない場合は
一要素の配列 [arg] を返します。
@param arg 変換対象のオブジェクトです。
@raise TypeError to_ary, to_a の返り値が配列でなければ発生します
//emlist[例][ruby]{
p Array({:it => 3}) #=> [[:it, 3]]
p Array(nil) #=> []
p Array("... -
Kernel
. # fail(error _ type , message = nil , backtrace = caller(0) , cause: $ !) -> () (640.0) -
例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。
...します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に......end
foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}
//emlist[例3][ruby]{
class MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end
begin
raise MyException.new
rescue SecurityError
p $! #=> #<SecurityError: SecurityError>
end
//}
@see Kernel.#caller... -
Kernel
. # raise(error _ type , message = nil , backtrace = caller(0) , cause: $ !) -> () (640.0) -
例外を発生させます。 発生した例外は変数 $! に格納されます。また例外が 発生した時のスタックトレースは変数 $@ に格納され ます。発生した例外は rescue 節で捕捉できます。
...します。
@param message 例外のメッセージとなる文字列です。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@param cause 現在の例外($!)の代わりに Exception#cause に......end
foo(4) #=> in method.in rescue.in method.in else.in ensure.
//}
//emlist[例3][ruby]{
class MyException
def exception(mesg=nil)
SecurityError.new(mesg)
end
end
begin
raise MyException.new
rescue SecurityError
p $! #=> #<SecurityError: SecurityError>
end
//}
@see Kernel.#caller... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (604.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 (604.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 _ sizeof(type , headers = nil) -> Integer | nil (604.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 (604.0) -
与えられた型のサイズを返します。
与えられた型のサイズを返します。
型 type がシステムに存在する場合は、グローバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
require 'mkmf'
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロをコンパイラに渡します。
@param type 検査したい型を指定します。
@param headers 追加のヘッダファイルを指定します。 -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (604.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (604.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# have _ struct _ member(type , member , headers = nil) -> bool (604.0) -
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在する場合は、
グローバル変数 $defs に "-DHAVE_type_member" を追加し、真を返します。
member というメンバを持つ構造体 type が存在しない場合は、偽を返します。
例えば
require 'mkmf'
have_struct_member('struct foo', 'bar') # => true
である場合、HAVE_STRUCT_FOO_BAR というプリプロセッサマクロをコンパ... -
Kernel
# have _ struct _ member(type , member , headers = nil) { . . . } -> bool (604.0) -
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在する場合は、
グローバル変数 $defs に "-DHAVE_type_member" を追加し、真を返します。
member というメンバを持つ構造体 type が存在しない場合は、偽を返します。
例えば
require 'mkmf'
have_struct_member('struct foo', 'bar') # => true
である場合、HAVE_STRUCT_FOO_BAR というプリプロセッサマクロをコンパ... -
Kernel
. # _ _ callee _ _ -> Symbol | nil (340.0) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
...//emlist[例][ruby]{
def foo
p __callee__
end
alias :bar :foo
foo # => :foo
bar # => :bar
p __callee__ # => nil
//}
Kernel.#__method__ とは異なり、現在のメソッド名が alias されたメ
ソッドの場合には alias 先のメソッド名を返します。
@see Kernel.#__method__... -
Kernel
. # _ _ method _ _ -> Symbol | nil (340.0) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
現在のメソッド名を返します。
メソッドの外で呼ばれると nil を返します。
//emlist[例][ruby]{
def foo
p __method__
end
alias :bar :foo
foo #=> :foo
bar #=> :foo
p __method__ #=> nil
//}
現在のメソッド名が alias されたメソッドの場合でも alias 元のメソッド名
を返します。 -
Kernel
. # global _ variables -> [Symbol] (322.0) -
プログラム中で定義されているグローバル変数(`$'で始まる変数)名の 配列を返します。
...グラム中で定義されているグローバル変数(`$'で始まる変数)名の
配列を返します。
//emlist[例][ruby]{
p global_variables #=> [:$;, :$-F, :$@, ... ]
//}
@see Kernel.#local_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables... -
Kernel
. # local _ variables -> [Symbol] (322.0) -
現在のスコープで定義されているローカル変数名の配列を返します。
...現在のスコープで定義されているローカル変数名の配列を返します。
//emlist[例][ruby]{
yuyu = 0
p local_variables #=> [:yuyu]
//}
@see Kernel.#global_variables,Object#instance_variables,Module.constants,Module#constants,Module#class_variables...