種類
- インスタンスメソッド (797)
- モジュール関数 (657)
- 変数 (243)
ライブラリ
- English (36)
- ビルトイン (768)
- bigdecimal (24)
- continuation (12)
- delegate (12)
- digest (12)
-
irb
/ xmp (12) - json (36)
-
minitest
/ spec (1) - mkmf (672)
- open-uri (8)
- pp (4)
- psych (24)
- rubygems (12)
-
rubygems
/ custom _ require (12) -
rubygems
/ timer (12) - timeout (16)
- un (12)
- uri (12)
キーワード
-
$ -K (5) -
$ -a (12) -
$ -d (12) -
$ -l (12) -
$ -p (12) -
$ -v (12) -
$ -w (12) -
$ = (12) -
$ > (12) -
$ DEBUG (12) -
$ IGNORECASE (12) -
$ INPUT _ LINE _ NUMBER (12) -
$ KCODE (5) -
$ NR (12) -
$ SAFE (5) -
$ VERBOSE (12) -
$ libdir (12) -
$ libs (12) -
$ sitelibdir (12) -
$ stderr (12) -
$ stdin (12) -
$ stdout (12) - BigDecimal (24)
- Complex (24)
- DelegateClass (12)
- Digest (12)
- Integer (12)
- JSON (12)
- URI (12)
-
_ _ callee _ _ (12) -
_ _ method _ _ (12) - abort (24)
-
arg
_ config (12) - binding (12)
-
block
_ given? (12) - callcc (12)
-
caller
_ locations (24) - catch (24)
-
convertible
_ int (24) - describe (1)
-
egrep
_ cpp (24) -
enable
_ config (24) - eval (24)
- fail (12)
-
find
_ executable (12) -
find
_ header (12) -
find
_ library (24) - format (12)
- gem (12)
- gets (12)
-
global
_ variables (12) - gsub (36)
-
have
_ devel? (12) -
have
_ framework (24) -
have
_ func (24) -
have
_ header (24) -
have
_ library (24) -
have
_ macro (24) -
have
_ struct _ member (24) -
have
_ type (24) -
have
_ var (24) -
install
_ rb (12) - iterator? (12)
- j (12)
- jj (12)
- lambda (18)
- libpathflag (12)
-
link
_ command (12) -
local
_ variables (12) - loop (12)
-
merge
_ libs (12) - open (32)
- p (12)
- pp (12)
- printf (24)
- proc (19)
-
psych
_ y (12) - putc (12)
- raise (12)
- readline (12)
- readlines (12)
- require (24)
-
require
_ relative (12) - sprintf (12)
- sub (24)
- system (48)
- test (24)
- time (12)
- timeout (16)
-
try
_ compile (24) -
try
_ cpp (24) -
try
_ func (24) -
try
_ link (24) -
try
_ run (24) -
try
_ static _ assert (24) -
try
_ type (24) -
try
_ var (24) -
untrace
_ var (12) -
wait
_ writable (12) -
with
_ config (24) -
with
_ werror (24) - xmp (12)
- xpopen (12)
- y (12)
検索結果
先頭5件
-
Kernel
. # require _ relative(relative _ feature) -> bool (12601.0) -
現在のファイルからの相対パスで require します。
...相対パスで require します。
require File.expand_path(relative_feature, File.dirname(__FILE__))
とほぼ同じです。
Kernel.#eval などで文字列を評価した場合に、そこから
require_relative を呼出すと必ず失敗します。
@param relative_feature ファイル......名の文字列です。
@raise LoadError ロードに失敗した場合に発生します。
@see Kernel.#require
=== require と load のスコープ
ローカル変数はファイル間では共有されません。ですので、
ロードしたライブラリのローカル変数を
ロード......扱い方はKernel.#loadでも同様です。
//emlist[例][ruby]{
# ---------- some.rb -----------
$a = 1
@a = 1
A = 1
a = 1
# ---------- end some.rb -------
require 'some'
p $a #=> 1
p @a #=> 1
p A #=> 1
p a # undefined local variable or method `a' for #<Object:0x294f9ec @a=1> (NameError)
//}... -
Kernel
# have _ struct _ member(type , member , headers = nil) -> bool (12301.0) -
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
...ember というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在する場合は、
グローバル変数 $defs に "-DHAVE_type_member" を追加し、真を返します。
member......偽を返します。
例えば
require 'mkmf'
have_struct_member('struct foo', 'bar') # => true
である場合、HAVE_STRUCT_FOO_BAR というプリプロセッサマクロをコンパイラに渡します。
また、後方互換性のために HAVE_ST_BAR というプリプロセッサマ......クロも定義します。
@param type 検査したい構造体の名前を指定します。
@param member 検査したい構造体のメンバの名前を指定します。
@param headers 追加のヘッダファイルを指定します。... -
Kernel
# have _ struct _ member(type , member , headers = nil) { . . . } -> bool (12301.0) -
member というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
...ember というメンバを持つ構造体 type がシステムに存在するかどうか検査します。
member というメンバを持つ構造体 type がシステムに存在する場合は、
グローバル変数 $defs に "-DHAVE_type_member" を追加し、真を返します。
member......偽を返します。
例えば
require 'mkmf'
have_struct_member('struct foo', 'bar') # => true
である場合、HAVE_STRUCT_FOO_BAR というプリプロセッサマクロをコンパイラに渡します。
また、後方互換性のために HAVE_ST_BAR というプリプロセッサマ......クロも定義します。
@param type 検査したい構造体の名前を指定します。
@param member 検査したい構造体のメンバの名前を指定します。
@param headers 追加のヘッダファイルを指定します。... -
Kernel
# merge _ libs(*libs) -> [String] (12301.0) -
@todo 使われてない
...@todo 使われてない
@param libs ???... -
Kernel
$ $ INPUT _ LINE _ NUMBER -> Integer (12301.0) -
$. の別名
...$. の別名
1 e
2 f
3 g
4 h
5 i
# end of a.txt
require "English"
File.foreach(ARGV.at(0)){|line|
# read line
}
p $INPUT_LINE_NUMBER
# end of sample.rb
ruby sample.rb a.txt
#=> 5... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (12201.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......assed 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'
suff......ed 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 FOOBART2... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (12201.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......assed 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'
suff......ed 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 FOOBART2... -
Kernel
# describe(desc) { . . . } (12201.0) -
与えられた説明文から名前を作成してテストクラスを定義します。
...与えられた説明文から名前を作成してテストクラスを定義します。
クラスの定義は、与えられたブロックの内容になります。
@param desc ブロックに対する説明を指定します。... -
Kernel
# find _ library(lib , func , *paths) -> bool (12201.0) -
関数 func が定義されたライブラリ lib を探します。
...関数 func が定義されたライブラリ lib を探します。
最初はパスを指定せずに探し、
それに失敗したら paths[0] を指定して探し、
それにも失敗したら paths[1] を指定して探し……
というように、リンク可能なライブラリを探......ます。
上記の探索でライブラリ lib を発見できた場合は lib を $libs に追加し、
見つかったパスを $LDFLAGS に追加して true を返します。
指定されたすべてのパスを検査してもライブラリ lib が見つからないときは、
変数を変......paths を指定しないときは Kernel#have_library と同じ動作です。
@param lib ライブラリ名を指定します。
@param func 関数名を指定します。
nil または空文字列を指定した場合は "main" になります。
@param paths ライブラリを検... -
Kernel
# find _ library(lib , func , *paths) { . . . } -> bool (12201.0) -
関数 func が定義されたライブラリ lib を探します。
...関数 func が定義されたライブラリ lib を探します。
最初はパスを指定せずに探し、
それに失敗したら paths[0] を指定して探し、
それにも失敗したら paths[1] を指定して探し……
というように、リンク可能なライブラリを探......ます。
上記の探索でライブラリ lib を発見できた場合は lib を $libs に追加し、
見つかったパスを $LDFLAGS に追加して true を返します。
指定されたすべてのパスを検査してもライブラリ lib が見つからないときは、
変数を変......paths を指定しないときは Kernel#have_library と同じ動作です。
@param lib ライブラリ名を指定します。
@param func 関数名を指定します。
nil または空文字列を指定した場合は "main" になります。
@param paths ライブラリを検...