種類
- モジュール関数 (159)
- インスタンスメソッド (147)
- 変数 (144)
- 定数 (12)
ライブラリ
キーワード
-
$ ! (3) -
$ & (3) -
$ ' (3) -
$ + (3) -
$ , (3) -
$ -0 (3) -
$ -F (3) -
$ -K (2) -
$ -W (2) -
$ -i (3) -
$ -v (3) -
$ -w (3) -
$ / (3) -
$ 1 (3) -
$ 10 (3) -
$ 11 (3) -
$ 2 (3) -
$ 3 (3) -
$ 4 (3) -
$ 5 (3) -
$ 6 (3) -
$ 7 (3) -
$ 8 (3) -
$ 9 (3) -
$ ; (3) -
$ ? (3) -
$ @ (3) -
$ CHILD _ STATUS (3) -
$ ERROR _ POSITION (3) -
$ FIELD _ SEPARATOR (3) -
$ FS (3) -
$ INPUT _ RECORD _ SEPARATOR (3) -
$ KCODE (2) -
$ LAST _ MATCH _ INFO (3) -
$ LAST _ PAREN _ MATCH (3) -
$ LAST _ READ _ LINE (3) -
$ MATCH (3) -
$ OFS (3) -
$ ORS (3) -
$ OUTPUT _ FIELD _ SEPARATOR (3) -
$ OUTPUT _ RECORD _ SEPARATOR (3) -
$ POSTMATCH (3) -
$ PREMATCH (3) -
$ RS (3) -
$ VERBOSE (3) -
$ \ (3) -
$ _ (3) -
$ ` (3) -
$ ~ (3) - Array (3)
- DATA (3)
- FALSE (3)
- Float (3)
- Integer (3)
- Rational (3)
- TRUE (3)
-
_ _ callee _ _ (2) -
_ _ method _ _ (3) - abort (3)
- autoload (3)
- autoload? (3)
- caller (3)
-
check
_ signedness (2) -
check
_ sizeof (6) - chomp (1)
- chomp! (1)
- chop (1)
- chop! (1)
-
convertible
_ int (4) -
create
_ makefile (3) -
dir
_ config (3) - eval (6)
- fail (9)
-
find
_ executable (3) -
find
_ library (6) - fork (6)
- getc (1)
- getopts (1)
- gets (3)
-
have
_ func (6) -
have
_ header (6) -
have
_ library (6) -
have
_ macro (6) -
have
_ struct _ member (6) -
have
_ type (6) -
have
_ var (6) -
install
_ files (3) -
install
_ rb (3) - j (2)
- jj (2)
- lambda (6)
- loop (3)
- modified? (3)
- namespace (2)
- open (6)
- p (1)
- parseArgs (1)
- pp (1)
- print (3)
- printf (6)
- proc (6)
- puts (3)
- raise (9)
- readline (3)
- readlines (3)
- select (3)
-
set
_ trace _ func (6) - spawn (8)
- system (10)
- test (6)
- throw (3)
- timeout (6)
-
trace
_ var (9) -
try
_ constant (6) -
try
_ func (6) -
try
_ run (6) -
try
_ static _ assert (6) -
try
_ type (6) -
try
_ var (6) -
untrace
_ var (3) - warn (3)
-
with
_ config (6) -
with
_ werror (6) - xmp (3)
- xsystem (1)
検索結果
先頭5件
- Kernel
:: NIL -> NilClass - Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil - Kernel
# check _ signedness(type , headers = nil , opts = nil) { . . . } -> "signed" | "unsigned" | nil - Kernel
# check _ sizeof(type , headers = nil) -> Integer | nil - Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil
-
Kernel
:: NIL -> NilClass (18236) -
非推奨です。 nil と同じ。
...非推奨です。 nil と同じ。
この定数は過去との互換性のために提供されています。擬似変数 nil を使ってください。
Ruby では false と nil が偽として扱われます。
偽でない値(false でも nil でもない値) は全て真とみなされま... -
Kernel
# check _ signedness(type , headers = nil , opts = nil) -> "signed" | "unsigned" | nil (307) -
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) -
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 (211) -
与えられた型のサイズを返します。
...ーバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロを... -
Kernel
# check _ sizeof(type , headers = nil) { . . . } -> Integer | nil (211) -
与えられた型のサイズを返します。
...ーバル変数 $defs に
"-DSIZEOF_type=X" を追加し、型のサイズを返します。型 type がシステムに
存在しない場合は、nil を返します。
例えば、
check_sizeof('mystruct') # => 12
である場合、SIZEOF_MYSTRUCT=12 というプリプロセッサマクロを... -
Kernel
# have _ library(lib , func = nil , headers = nil) -> bool (211) -
ライブラリ 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) -
ライブラリ 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) -
定数 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) -
定数 const がシステムに存在するかどうか検査します。 Kernel#have_const を使ってください。
...定数 const がシステムに存在するかどうか検査します。
Kernel#have_const を使ってください。
@param const C 言語の定数名を指定します。
@param headers 追加のヘッダファイルを指定します。
@param opt コンパイラに渡すオプションを......指定します。
$CFLAGS もコンパイラには渡されます。
@return 定数 const がシステムに存在する場合はその値を返します。
定数 const がシステムに存在しない場合は nil を返します。... -
Kernel
# find _ executable(bin , path = nil) -> String | nil (209) -
パス path から実行ファイル bin を探します。
...。
実行ファイルが見つかった場合は、そのフルパスを返します。
実行ファイルが見つからなかった場合は、nilを返します。
このメソッドは Makefile を変更しません。
@param bin 実行ファイルの名前を指定します。
@param path... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (205) -
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) { . . . } (205) -
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
. # open(name , mode = 'r' , perm = nil , options = {}) {|ouri| . . . } -> nil (204) -
name が http:// や ftp:// で始まっている文字列なら URI のリソースを 取得した上で StringIO オブジェクトとして返します。 StringIO オブジェクトは OpenURI::Meta モジュールで extend されています。
...ock) のように name の open メソッドが呼ばれます。
これ以外の場合は、name はファイル名として扱われ、従来の
Kernel.#open(name, *rest) が呼ばれます。
ブロックを与えた場合は上の場合と同様、name が http:// や ftp:// で
始まって......ram mode モードを文字列で与えます。Kernel.#open と同じです。
@param perm open(2) の第 3 引数のように、ファイルを生成する場合のファイルのパーミッションを
整数で指定します。Kernel.#open と同じです
@param options ハッシ... -
Kernel
# dir _ config(target , idefault = nil , ldefault = nil) -> [String , String] (203) -
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
# install _ files(mfile , ifiles , map = nil , srcprefix = nil) -> [] (203) -
このメソッドは create_makefile, install_rb が使用します。 内部用のメソッドです。
このメソッドは create_makefile, install_rb が使用します。
内部用のメソッドです。
@param mfile Makefile を表す File のインスタンスです。
@param ifiles インストールするファイルのリストを指定します。
@param map ???
@param srcprefix ソースディレクトリを指定します。 -
Kernel
. # select(reads , writes = [] , excepts = [] , timeout = nil) -> [[IO]] | nil (203) -
IO.select と同じです。
IO.select と同じです。
@param reads IO.select 参照
@param writes IO.select 参照
@param excepts IO.select 参照
@param timeout IO.select 参照
@see IO.select -
Kernel
. # print(*arg) -> nil (138) -
引数を順に標準出力 $stdout に出力します。引数が与えられない時には変数 $_ の値を出力します。
...ただし、nil に対しては文字列 "nil" を出力します
変数 $, (出力フィールドセパレータ)に nil で
ない値がセットされている時には、各引数の間にその文字列を出力します。
変数 $\ (出力レコードセパレータ)に nil でな
い値が......失敗した場合に発生します。
print "Hello, world!"
print "Regexp is",/ant/
print nil
print "\n"
#=> Hello, world!Regexp is(?-mix:ant)nil
$_ = "input"
$, = "<and>"
$\ = "<end>\n"
print
print "AA","BB"
#=> input<end>
#=> AA<and>BB<end>
@see Kernel.#puts,Kernel.#p... -
Kernel
# modified?(target , times) -> Time | nil (134) -
target が times の全ての要素よりも新しい場合は target の更新時刻を返します。 そうでない場合は nil を返します。target が存在しない場合も nil を返します。
...times の全ての要素よりも新しい場合は target の更新時刻を返します。
そうでない場合は nil を返します。target が存在しない場合も nil を返します。
@param target 対象のファイル名を指定します。
@param times Time の配列か Time を... -
Kernel
. # warn(message) -> nil (130) -
message を 標準エラー出力 $stderr に出力します。 $VERBOSE フラグ が nil のときは何も出力しません。
...message を 標準エラー出力 $stderr に出力します。 $VERBOSE
フラグ が nil のときは何も出力しません。
文字列以外のオブジェクトが引数として与えられた場合には、
to_s メソッドにより文字列に変換してから出力します。
こ......です。
@raise IOError 標準エラー出力が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
warn "caution!" #=> caution!
$VERBOSE = nil
warn "caution!" # 何もしない
@see $stderr,$VERBOSE... -
Kernel
$ $ 1 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 10 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 11 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 2 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 3 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 4 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 5 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 6 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 7 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 8 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
$ $ 9 -> String | nil (128) -
最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。 該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
...最後に成功したパターンマッチで n 番目の括弧にマッチした値が格納されます。
該当する括弧がなければ nil が入っています。(覚え方: \数字 のようなもの)
番号 n はいくらでも大きな正整数を利用できます。
Regexp.last_matc... -
Kernel
. # trace _ var(varname) {|new _ val| . . . . } -> nil (127) -
グローバル変数 varname への代入のフックを登録します。
...、hook に nil を
指定するか、Kernel.#untrace_var を用います。
hook が nil ならば、設定されていた
hook をすべて解除してその配列を返します(ブロックで登録されていれば
Proc オブジェクトで返されます)
それ以外は、nil を返しま......は nil を返します。解除した場合は解除した
フックを並べた配列を返します。
trace_var(:$v){|val| puts "hook: $v=#{val.inspect}" }
$v = 1 #=> hook: $v=1
$v = "foo" #=> hook: $v="foo"
$v.upcase!
p $v #=> "FOO"
@see Kernel.#unt... -
Kernel
. # trace _ var(varname , hook) -> nil (127) -
グローバル変数 varname への代入のフックを登録します。
...、hook に nil を
指定するか、Kernel.#untrace_var を用います。
hook が nil ならば、設定されていた
hook をすべて解除してその配列を返します(ブロックで登録されていれば
Proc オブジェクトで返されます)
それ以外は、nil を返しま......は nil を返します。解除した場合は解除した
フックを並べた配列を返します。
trace_var(:$v){|val| puts "hook: $v=#{val.inspect}" }
$v = 1 #=> hook: $v=1
$v = "foo" #=> hook: $v="foo"
$v.upcase!
p $v #=> "FOO"
@see Kernel.#unt... -
Kernel
. # caller(level _ num = 1) -> [String] | nil (126) -
level_num 段上の呼び出し元の情報を $@ の形式のバックトレース(文字列の配列)として返します。
...ます。
指定した level_num 段上が存在しない場合は nil を返します。
@param level_num long の範囲を超えない正の整数でスタックレベルを指定します。
@see Kernel.#set_trace_func,Kernel.#raise
def foo
p caller(0)
p caller(1)
p calle......r
foo
end
bar
#=> ["-:2:in `foo'", "-:10:in `bar'", "-:13"]
# ["-:10:in `bar'", "-:13"]
# ["-:13"]
# []
# nil
以下の関数は、caller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。
def parse_caller......bar
foo
p parse_caller(caller.first)
end
bar
p parse_caller(caller.first)
#=> ["-", 15, "bar"]
# ["-", 19, nil]
# nil
以下は、$DEBUG が真の場合に役に立つ debug 関数
のサンプルです。
$DEBUG = true
def debug(*args)......> ["-:2:in `foo'", "-:10:in `bar'", "-:13:in `<main>'"]
# ["-:10:in `bar'", "-:13:in `<main>'"]
# ["-:13:in `<main>'"]
# []
# nil
以下の関数は、caller の要素から [ファイル名, 行番号, メソッド名]
を取り出して返します。
def parse_caller... -
Kernel
. # gets(rs = $ / ) -> String | nil (126) -
ARGFから一行読み込んで、それを返します。 行の区切りは引数 rs で指定した文字列になります。
...ARGFから一行読み込んで、それを返します。
行の区切りは引数 rs で指定した文字列になります。
rs に nil を指定すると行区切りなしとみなしてファイルの内容を
すべて読み込みます。ARGVに複数のファイル名が存在する場......、 nil を返します。
@raise Errno::EXXX 読み込みに失敗した場合に発生します。
---main.rb---
ARGV << 'b.txt' << 'c.txt'
p gets #=> "hello\n"
p gets(nil) #=> "it\ncommon\n"
p gets("") #=> "ARGF\n\n"
p gets('、') #=> "スクリプトに指定した引数 (Kernel::AR......想ファイルを表すオブジェクトです。 \n"
p gets #=> nil
p readline # end of file reached (EOFError)
--- b.txt ---
hello
it
common
--- c.txt ---
ARGF
スクリプトに指定した引数 (Kernel::ARGV を参照) をファイル名と
みなして、それらの... -
Kernel
. # puts(*arg) -> nil (126) -
引数と改行を順番に 標準出力 $stdout に出力します。 引数がなければ改行のみを出力します。
...ェクトを最初に to_ary により配列へ、
次に to_s メソッドにより文字列へ変換を試みます。
ただし、nil に対しては文字列 "nil" を出力します
末尾が改行で終っている引数や配列の要素に対しては puts 自身
は改行を出力しませ......した場合に発生します。
puts "foo", "bar\n", "baz"
puts "" # 改行のみ出力
puts # 改行のみ出力
puts nil
puts ["oui", "non"]
#=> foo
# bar
# baz
#
#
# nil
# oui
# non
@see Kernel.#print, Kernel.#p, IO#puts... -
Kernel
. # _ _ callee _ _ -> Symbol | nil (125) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
...現在のメソッド名を返します。
メソッドの外で呼ばれると nil を返します。
def foo
p __method__
end
foo #=> :foo
p __method__ #=> nil... -
Kernel
. # _ _ method _ _ -> Symbol | nil (125) -
現在のメソッド名を返します。 メソッドの外で呼ばれると nil を返します。
...現在のメソッド名を返します。
メソッドの外で呼ばれると nil を返します。
def foo
p __method__
end
foo #=> :foo
p __method__ #=> nil... -
Kernel
$ $ & -> String | nil (124) -
現在のスコープで最後に成功した正規表現のパターンマッチでマッチした文字列です。 最後のマッチが失敗していた場合には nil となります。
...最後のマッチが失敗していた場合には nil となります。
Regexp.last_match[0] と同じです。
この変数はローカルスコープかつスレッドローカル、読み取り専用です。
Ruby起動時の初期値は nil です。
=== 例
str = '<p><a href="http://exam...
