るりまサーチ (Ruby 2.3.0)

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

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. rsa d
  4. rsa d=
  5. matrix d

検索結果

Kernel#have_header(header, preheaders = nil) -> bool (18907.0)

ヘッダファイル header がシステムに存在するかどうか検査します。

ヘッダファイル header がシステムに存在するかどうか検査します。

ヘッダファイル header が存在する場合は、グローバル変数 $defs に
"-DHAVE_header" を追加して true を返します。ヘッダファイル header が存
在しない場合は $defs は変更せず false を返します。

@param header 検査したいヘッダファイルを指定します。

@param preheaders ヘッダファイルを検査する前に読み込んでおくヘッダファイルを指定します。

Kernel#have_header(header, preheaders = nil) { ... } -> bool (18907.0)

ヘッダファイル header がシステムに存在するかどうか検査します。

ヘッダファイル header がシステムに存在するかどうか検査します。

ヘッダファイル header が存在する場合は、グローバル変数 $defs に
"-DHAVE_header" を追加して true を返します。ヘッダファイル header が存
在しない場合は $defs は変更せず false を返します。

@param header 検査したいヘッダファイルを指定します。

@param preheaders ヘッダファイルを検査する前に読み込んでおくヘッダファイルを指定します。

Kernel#create_header(header = "extconf.h") -> String (18607.0)

Kernel#have_func, Kernel#have_header などの検査結果を元に、 ヘッダファイルを生成します。

...
Kernel
#have_func, Kernel#have_header などの検査結果を元に、
ヘッダファイルを生成します。

このメソッドは extconf.rb の最後で呼び出すようにしてください。

@param header ヘッダファイルの名前を指定します。

@return ヘッダファイ...

Kernel#depend_rules(depend) -> Array (18607.0)

ファイルの依存関係の書かれた depend ファイルの内容を処理します。

ファイルの依存関係の書かれた depend ファイルの内容を処理します。

@param depend depend ファイルの内容を指定します。

@return 見つかった依存関係を Makefile 形式で返します。

Kernel#desc(description) -> String (18607.0)

直後の Rake タスクの説明を登録します。

直後の Rake タスクの説明を登録します。

@param description 直後のタスクの説明を指定します。

例:
desc "Run the Unit Tests"
task :test => [:build] do
runtests
end

絞り込み条件を変える

Kernel#directory(dir) -> () (18607.0)

与えられたディレクトリを作成するタスクを定義します。

与えられたディレクトリを作成するタスクを定義します。

@param dir 作成するディレクトリを指定します。

例:
directory 'testdata/doc'

Kernel#DelegateClass(superclass) -> object (18307.0)

クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、 そのクラスを返します。

クラス superclass のインスタンスへメソッドを委譲するクラスを定義し、
そのクラスを返します。

@param superclass 委譲先となるクラス

例:

//emlist{
require 'delegate'

class ExtArray < DelegateClass(Array)
def initialize
super([])
end
end
a = ExtArray.new
p a.class # => ExtArray
a.push 25
p a # => [25]
//}

Kernel#Digest(name) -> object (18307.0)

"MD5"や"SHA1"などのダイジェストを示す文字列 name を指定し、 対応するダイジェストのクラスを取得します。

...
Digest::MD5などを直接呼び出すと問題があるときはこのメソッドを使
うか、起動時に使用するライブラリを Kernel.#require してください。

@param name "MD5"や"SHA1"などのダイジェストを示す文字列を指定します。
@return Digest::MD5や...

Kernel#cc_command(opt = "") -> String (18307.0)

実際にコンパイルする際に使用するコマンドを返します。

実際にコンパイルする際に使用するコマンドを返します。

@param opt コンパイラに与える追加のコマンドライン引数を指定します。

@see RbConfig.expand

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

ファイルのアクセス権を変更します。

ファイルのアクセス権を変更します。

Change the mode of each FILE to OCTAL-MODE.

ruby -run -e chmod -- [OPTION] OCTAL-MODE FILE

-v 詳細表示

@see chmod(1)

Kernel#cpp_command(outfile, opt = "") -> String (18307.0)

実際にプリプロセッサを実行する際に使用するコマンドを返します。

実際にプリプロセッサを実行する際に使用するコマンドを返します。

@param outfile 出力ファイルの名前を指定します。

@param opt プリプロセッサに与える追加のコマンドライン引数を指定します。

@see RbConfig.expand

Kernel#dir_config(target, idefault = nil, ldefault = nil) -> [String, String] (18307.0)

configure オプション --with-TARGET-dir, --with-TARGET-include, --with-TARGET-lib をユーザが extconf.rb に指定できるようにします。

configure オプション
--with-TARGET-dir,
--with-TARGET-include,
--with-TARGET-lib
をユーザが extconf.rb に指定できるようにします。

--with-TARGET-dir オプションは
システム標準ではない、
ヘッダファイルやライブラリがあるディレクトリをまとめて指定するために使います。
ユーザが extconf.rb に --with-TARGET-dir=PATH を指定したときは
$CFLAGS に "-IPATH/include" を、
$LDFLAGS に "-LPATH/lib" を、
それぞれ追加し...

Kernel#dummy_makefile(srcdir) -> String (18307.0)

ダミーの Makefile を作成します。

ダミーの Makefile を作成します。

@param srcdir ソースディレクトリを指定します。

絞り込み条件を変える

Kernel#find_executable(bin, path = nil) -> String | nil (18307.0)

パス path から実行ファイル bin を探します。

パス path から実行ファイル bin を探します。

実行ファイルが見つかった場合は、そのフルパスを返します。
実行ファイルが見つからなかった場合は、nilを返します。

このメソッドは Makefile を変更しません。

@param bin 実行ファイルの名前を指定します。

@param path パスを指定します。デフォルトは環境変数 PATH です。
環境変数 PATH が定義されていない場合は /usr/local/bin,
/usr/ucb, /usr/bin, /bin を使います。

Kernel#find_header(header, *paths) -> bool (18307.0)

与えられた paths から header を検索し、見つかった場合は真を返します。 そうでない場合は偽を返します。

与えられた paths から header を検索し、見つかった場合は真を返します。
そうでない場合は偽を返します。

ヘッダが見つかったディレクトリをコンパイラに渡すコマンドラインオプショ
ンに追加します(-I オプションを経由します)。

@param header ヘッダを指定します。

@param paths ヘッダを検索するパスを指定します。

Kernel#find_library(lib, func, *paths) -> bool (18307.0)

関数 func が定義されたライブラリ lib を探します。

...査してもライブラリ lib が見つからないときは、
変数を変更せず false を返します。

paths を指定しないときは Kernel#have_library と同じ動作です。

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

@param func 関数名を指定します。...

Kernel#find_library(lib, func, *paths) { ... } -> bool (18307.0)

関数 func が定義されたライブラリ lib を探します。

...査してもライブラリ lib が見つからないときは、
変数を変更せず false を返します。

paths を指定しないときは Kernel#have_library と同じ動作です。

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

@param func 関数名を指定します。...

Kernel#find_type(type, opt, *headers) -> Array (18307.0)

静的な型 type がシステムに存在するかどうか検査します。

...な型 type がシステムに存在するかどうか検査します。

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

@param opt コンパイラに渡す追加のオプションを指定します。

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

@see Kernel#have_type...

絞り込み条件を変える

Kernel#find_type(type, opt, *headers) { ... } -> Array (18307.0)

静的な型 type がシステムに存在するかどうか検査します。

...な型 type がシステムに存在するかどうか検査します。

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

@param opt コンパイラに渡す追加のオプションを指定します。

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

@see Kernel#have_type...

Kernel#have_devel? -> bool (18307.0)

開発環境がインストールされているかどうか検査するために何もしない実行ファ イルを作成しようと試みます。成功した場合は、真を返します。失敗した場合 は、偽を返します。

開発環境がインストールされているかどうか検査するために何もしない実行ファ
イルを作成しようと試みます。成功した場合は、真を返します。失敗した場合
は、偽を返します。

Kernel#httpd -> () (18307.0)

WEBrick HTTP server を起動します。

WEBrick HTTP server を起動します。

ruby -run -e httpd -- [OPTION] [DocumentRoot]

--bind-address=ADDR バインドアドレスを指定します
--port=NUM ポート番号を指定します
--max-clients=MAX 同時接続数の最大値
--temp-dir=DIR 一時ディレクトリを指定します
--do-not-reverse-lookup 逆引きを無効にします
--requ...

Kernel#link_command(ldflags, opt = "", libpath = $DEFLIBPATH|$LIBPATH) -> String (18307.0)

実際にリンクする際に使用するコマンドを返します。

実際にリンクする際に使用するコマンドを返します。

@param ldflags LDFLAGS に追加する値を指定します。

@param opt LIBS に追加する値を指定します。

@param libpath LIBPATH に指定する値を指定します。

@see RbConfig.expand

Kernel#mkdir -> () (18307.0)

ディレクトリを作成します。

ディレクトリを作成します。


ruby -run -e mkdir -- [OPTION] DIR

-p ディレクトリが存在してもエラーになりません。
必要であれば親ディレクトリも作成します。
-v 詳細表示

@see mkdir(1)

絞り込み条件を変える

Kernel#modified?(target, times) -> Time | nil (18307.0)

target が times の全ての要素よりも新しい場合は target の更新時刻を返します。 そうでない場合は nil を返します。target が存在しない場合も nil を返します。

target が times の全ての要素よりも新しい場合は target の更新時刻を返します。
そうでない場合は nil を返します。target が存在しない場合も nil を返します。

@param target 対象のファイル名を指定します。

@param times Time の配列か Time を一つ指定します。

Kernel#rmdir -> () (18307.0)

空のディレクトリを削除します。

空のディレクトリを削除します。

ruby -run -e rmdir -- [OPTION] DIR

-p DIR で指定されたディレクトリとその上位ディレクトリを削除します
-v 詳細表示

@see rmdir(1)

Kernel#try_do(src, command, *opts) -> () (18307.0)

@param src C プログラムのソースコードを指定します。

...aram src C プログラムのソースコードを指定します。

@param command コマンドを指定します。

@param opts オプションを Hash で指定します。

@raise RuntimeError 開発環境がインストールされていない場合に発生します。

@see Kernel#xsystem...

Kernel#try_do(src, command, *opts) { ... } -> () (18307.0)

@param src C プログラムのソースコードを指定します。

...aram src C プログラムのソースコードを指定します。

@param command コマンドを指定します。

@param opts オプションを Hash で指定します。

@raise RuntimeError 開発環境がインストールされていない場合に発生します。

@see Kernel#xsystem...

Kernel#enable_config(config, default) {|config, default| ... } -> bool | String (607.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --enable-<config> が指定された場合は、真を返し
ます。--disable-<config> が指定された場合は。偽を返します。どちらでもな
い場合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if enable_config("debug")
...

絞り込み条件を変える

Kernel#with_config(config, default = nil) {|config, default| ... } -> bool | String (607.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs...

Kernel#arg_config(config, default) { ... } -> object | String | true | nil (307.0)

configure オプション --config の値を返します。

configure オプション --config の値を返します。

@param config オプションを文字列で指定します。

@param default 引数 config で指定したオプションのデフォルト値を指定します。

@return オプションが指定されてた場合は true を、指定されなかった場合は
nil を返します。
引数 default、あるいはブロックを指定すると、オプションが指定さ
れていない場合に引数 default の値かブロックの評価結果を返します
(両方指定した場合はブロックが優先されます)...

Kernel#check_sizeof(type, headers = nil) -> Integer | nil (307.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 (307.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) (307.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) { ... } (307.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#enable_config(config, default) -> bool | String (307.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --enable-<config> が指定された場合は、真を返し
ます。--disable-<config> が指定された場合は。偽を返します。どちらでもな
い場合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if enable_config("debug")
...

Kernel#have_func(func, headers = nil) -> bool (307.0)

関数 func がシステムに存在するかどうかを検査します。

関数 func がシステムに存在するかどうかを検査します。

関数 func が存在すれば $defs に "-DHAVE_func" (func は大文字に変
換されます) を追加して true を返します。関数 func が見つからないときは
グローバル変数を変更せず false を返します。

@param func 関数名を指定します。

@param headers 関数 func を使用するのに必要なヘッダファイル名を指定しま
す。これは関数の型をチェックするためではなく、関数が実際
にはマクロで定義されている場合などの...

Kernel#have_func(func, headers = nil) { ... } -> bool (307.0)

関数 func がシステムに存在するかどうかを検査します。

関数 func がシステムに存在するかどうかを検査します。

関数 func が存在すれば $defs に "-DHAVE_func" (func は大文字に変
換されます) を追加して true を返します。関数 func が見つからないときは
グローバル変数を変更せず false を返します。

@param func 関数名を指定します。

@param headers 関数 func を使用するのに必要なヘッダファイル名を指定しま
す。これは関数の型をチェックするためではなく、関数が実際
にはマクロで定義されている場合などの...

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

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

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

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

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

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

絞り込み条件を変える

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

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

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

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

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

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

Kernel#have_macro(macro, headers = nil, opt = "") -> bool (307.0)

与えられた macro が共通のヘッダファイルか headers に定義されている場合は真を返します。 そうでない場合は偽を返します。

与えられた macro が共通のヘッダファイルか headers に定義されている場合は真を返します。
そうでない場合は偽を返します。

@param macro マクロの名前を指定します。

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

@param opt C コンパイラに渡すコマンドライン引数を指定します。

Kernel#have_macro(macro, headers = nil, opt = "") { ... } -> bool (307.0)

与えられた macro が共通のヘッダファイルか headers に定義されている場合は真を返します。 そうでない場合は偽を返します。

与えられた macro が共通のヘッダファイルか headers に定義されている場合は真を返します。
そうでない場合は偽を返します。

@param macro マクロの名前を指定します。

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

@param opt C コンパイラに渡すコマンドライン引数を指定します。

Kernel#have_struct_member(type, member, headers = nil) -> bool (307.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 (307.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_type(type, headers = nil, opt = "") -> bool (307.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 (307.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_var(var, headers = nil) -> bool (307.0)

変数 var がシステムに存在するかどうか検査します。

変数 var がシステムに存在するかどうか検査します。

変数 var がシステムに存在する場合は、グローバル変数 $defs に
"-DHAVE_var" を追加し、真を返します。変数 var がシステムに存在しない場
合は、偽を返します。

例えば、

require 'mkmf'
have_var('foo') # => true

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

@param var 検査したい変数名を指定します。

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

Kernel#have_var(var, headers = nil) { ... } -> bool (307.0)

変数 var がシステムに存在するかどうか検査します。

変数 var がシステムに存在するかどうか検査します。

変数 var がシステムに存在する場合は、グローバル変数 $defs に
"-DHAVE_var" を追加し、真を返します。変数 var がシステムに存在しない場
合は、偽を返します。

例えば、

require 'mkmf'
have_var('foo') # => true

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

@param var 検査したい変数名を指定します。

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

Kernel#install_rb(mfile, dest, srcdir = nil) -> Array (307.0)

このメソッドは create_makefile が使用します。 内部用のメソッドです。

このメソッドは create_makefile が使用します。
内部用のメソッドです。

ディレクトリ srcdir/lib 配下の Ruby スクリプト (*.rb ファイル)
を dest にインストールするための Makefile 規則を mfile に出力します。

srcdir/lib のディレクトリ構造はそのまま dest 配下に反映されます。

@param mfile Makefile を表す File のインスタンスです。

@param dest インストールする先のディレクトリを指定します。

@param srcdir ソースディレクトリを指定します。

絞り込み条件を変える

Kernel#libpathflag(libpath = $DEFLIBPATH|$LIBPATH) -> String (307.0)

与えられた libpath を -L 付きの文字列に変換して返します。

与えられた libpath を -L 付きの文字列に変換して返します。

@param libpath LIBPATH に指定する値を指定します。

Kernel#time(msg, width = 25) { ... } -> object (307.0)

与えられたブロックの実行時間を計測して表示します。

与えられたブロックの実行時間を計測して表示します。

@param msg 表示するメッセージを指定します。

@param width 表示する幅を指定します。

@return ブロックの実行結果を返します。

Kernel#try_constant(const, headers = nil, opt = "") -> Integer | nil (307.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 (307.0)

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

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

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

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

@param opt コンパイラに渡すオプションを...

Kernel#try_func(func, libs, headers = nil) -> bool (307.0)

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

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

@param func 関数名を指定します。

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

@param headers 関数 func を使用するのに必要なヘッダファイ...

絞り込み条件を変える

Kernel#try_func(func, libs, headers = nil) { ... } -> bool (307.0)

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

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

@param func 関数名を指定します。

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

@param headers 関数 func を使用するのに必要なヘッダファイ...

Kernel#try_static_assert(expr, headers = nil, opt = "") -> bool (307.0)

@todo ???

@todo ???

...

@param expr C 言語の式を指定します。

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

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

Kernel#try_static_assert(expr, headers = nil, opt = "") { ... } -> bool (307.0)

@todo ???

@todo ???

...

@param expr C 言語の式を指定します。

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

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

Kernel#try_type(type, headers = nil, opt = "") -> bool (307.0)

Kernel#have_type を使ってください。

...
Kernel
#have_type を使ってください。

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

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

@param opt コンパイラに渡す追加のオプションを指定します。...

Kernel#try_type(type, headers = nil, opt = "") { ... } -> bool (307.0)

Kernel#have_type を使ってください。

...
Kernel
#have_type を使ってください。

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

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

@param opt コンパイラに渡す追加のオプションを指定します。...

絞り込み条件を変える

Kernel#try_var(var, headers = nil) -> bool (307.0)

Kernel#have_var を使ってください。

...
Kernel
#have_var を使ってください。

@param var 検査したい変数名を指定します。

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

Kernel#try_var(var, headers = nil) { ... } -> bool (307.0)

Kernel#have_var を使ってください。

...
Kernel
#have_var を使ってください。

@param var 検査したい変数名を指定します。

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

Kernel#with_config(config, default = nil) -> bool | String (307.0)

configure のオプションを検査します。

configure のオプションを検査します。

configure のオプションに --with-<config> が指定された場合は真を返しま
す。--without-<config> が指定された場合は偽を返します。どちらでもない場
合は default を返します。

これはデバッグ情報などのカスタム定義を、追加するのに役立ちます。

@param config configure のオプションの名前を指定します。

@param default デフォルト値を返します。


require 'mkmf'
if with_config("debug")
$defs...

Kernel#xmp(exps, bind = nil) -> XMP (307.0)

引数 exps で指定されたRuby のソースコードとその実行結果を、標準出力に行 ごとに交互に表示します。

...定します。

@param bind Binding オブジェクトを指定します。省略した場合は、最
後に実行した XMP#puts、Kernel#xmp の
Binding を使用します。まだ何も実行していない場合は
Object::TOPLEVEL_BINDING を使用します...

Kernel#xpopen(command, *mode) -> IO (307.0)

command を表示してから IO.popen の実行します。

...command を表示してから IO.popen の実行します。

@param command コマンド名を指定します。

@param mode オープンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。

@see IO.popen...

絞り込み条件を変える

Kernel#xpopen(command, *mode) { ... } -> object (307.0)

command を表示してから IO.popen の実行します。

...command を表示してから IO.popen の実行します。

@param command コマンド名を指定します。

@param mode オープンする IO ポートのモードを指定します。mode の詳細は Kernel.#open 参照して下さい。

@see IO.popen...

Kernel#xsystem(command, opts = nil) -> () (307.0)

Kernel.#system と同じですが、コマンドの出力は(標準出力、標準エラー 出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。

...
Kernel
.#system と同じですが、コマンドの出力は(標準出力、標準エラー
出力ともに)ログファイルに出力します。ログファイル名は mkmf.log です。

@param command コマンドを指定します。
@param opts オプションを Hash で指定します。...
...:werror というキーに真を指定すると

@see Kernel.#system...

Kernel#mkmf -> () (25.0)

mkmf を使って Makefile を作成します。

mkmf を使って Makefile を作成します。

ruby -run -e mkmf -- [OPTION] EXTNAME [OPTION]

-d ARGS run dir_config
-h ARGS run have_header
-l ARGS run have_library
-f ARGS run have_func
-v ARGS run have_var
-t ARGS run have_type
-m ARGS run have_macro
-c ARGS run have_const
--vendor install to ...