るりまサーチ

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

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel.#binding -> Binding (12401.0)

変数・メソッドなどの環境情報を含んだ Binding オブジェクトを 生成して返します。通常、Kernel.#eval の第二引数として使います。

...変数・メソッドなどの環境情報を含んだ Binding オブジェクトを
生成して返します。通常、Kernel.#eval の第二引数として使います。

//emlist[例][ruby]{
def foo
a = 1
binding
end

eval("p a", foo) #=> 1
//}

@see Kernel.#eval,Object::TOPLEVEL_BINDING...

Kernel$$INPUT_LINE_NUMBER -> Integer (12307.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#wait_writable -> () (12201.0)

ファイルが書き込み可能になるまで待ちます。

...ファイルが書き込み可能になるまで待ちます。

ruby -run -e wait_writable -- [OPTION] FILE

-n RETRY リトライ回数
-w SEC リトライごとに待つ秒数
-v 詳細表示...

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

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

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

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

Kernel.#Rational(x, y = 1, exception: true) -> Rational | nil (6307.0)

引数を有理数(Rational)に変換した結果を返します。

...を有理数(Rational)に変換した結果を返します。

@param x 変換対象のオブジェクトです。

@param y 変換対象のオブジェクトです。省略した場合は x だけを用いて
Rational オブジェクトを作成します。

@param exception false を指...
...に nil を返します。

@raise ArgumentError 変換できないオブジェクトを指定した場合に発生します。

引数 x、y の両方を指定した場合、x/y した Rational オブジェクトを
返します。

//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational...
...。また、Kernel.#Integer とは違い "0x10" のような進数を表す接頭
辞を含めた指定は行えません。

//emlist[例][ruby]{
Rational("1/3") # => (1/3)
Rational("0.3") # => (3/10)
Rational('0.3E0') # => (3/10)
Rational('0.1E1/3') # => (1/3)
Rational('1.2/3...

絞り込み条件を変える

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

...eturns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

I
f 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...
... 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_I...
...NT=-1 if check_signedness('int') is
done....

Kernel#check_signedness(type, headers = nil, opts = nil) { ... } -> "signed" | "unsigned" | nil (6301.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.

...eturns the signedness of the given +type+. You may optionally
specify additional +headers+ to search in for the +type+.

I
f 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...
... 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_I...
...NT=-1 if check_signedness('int') is
done....

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

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

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

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

これはデバ...
...義を、追加するのに役立ちます。

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

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


require 'mkmf'
i
f enable_config("debug")
$defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
end...

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

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

...ら実行ファイル bin を探します。

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

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

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

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

Kernel.#Integer(arg, base = 0) -> Integer (6225.0)

引数を整数(Fixnum,Bignum)に変換した結果を返します。

...引数を整数(Fixnum,Bignum)に変換した結果を返します。

引数が数値の場合は直接変換し(小数点以下切り落とし)、
文字列の場合は、進数を表す接頭辞を含む整数表現とみなせる文字列のみ
変換します。

数値と文字列以外...
...のオブジェクトに対しては arg.to_int, arg.to_i
この順に使用して変換します。

@param arg 変換対象のオブジェクトです。

@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合のみ)。省略...
...数) です。


@raise ArgumentError 整数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError メソッド to_int, to_i を持たないオブジェクトを引数に指定したか、to_int, to_i
が整数(Integerのサブクラス)を返...

絞り込み条件を変える

Kernel.#Integer(arg, base = 0, exception: true) -> Integer | nil (6225.0)

引数を整数(Fixnum,Bignum)に変換した結果を返します。

...引数を整数(Fixnum,Bignum)に変換した結果を返します。

引数が数値の場合は直接変換し(小数点以下切り落とし)、
文字列の場合は、進数を表す接頭辞を含む整数表現とみなせる文字列のみ
変換します。

数値と文字列以外...
...のオブジェクトに対しては arg.to_int, arg.to_i
この順に使用して変換します。

@param arg 変換対象のオブジェクトです。

@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合のみ)。省略...
...exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。

@raise ArgumentError 整数と見なせない文字列を引数に指定した場合に発生します。
@raise TypeError メソッド to_int, to_i...
<< 1 2 3 ... > >>