るりまサーチ

最速Rubyリファレンスマニュアル検索!
2881件ヒット [1-100件を表示] (0.141秒)
トップページ > クエリ:i[x] > クエリ:-[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 (12501.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 (12407.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 -> () (12331.0)

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

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

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

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

Kernel$$-I -> [String] (12268.0)

Rubyライブラリをロードするときの検索パスです。

...の検索パスです。

Kernel
.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。

起動時にはコマンドラインオプション -I で指定したディレクトリ、
環境変数 RUBYLIB の値、
コンパ...
...下に典型的な UNIX システム上でのロードパスを示します。

-
I で指定したパス
環境変数 RUBYLIB の値
/usr/local/lib/ruby/site_ruby/VERSION サイト固有、バージョン依存のライブラリ
/usr/local/lib/ruby/site_ruby/VERSION/ARCH サイト...
...ラリ
/usr/local/lib/ruby/site_ruby サイト固有ライブラリ
/usr/local/lib/ruby/VERSION 標準ライブラリ
/usr/local/lib/ruby/VERSION/ARCH 標準、システム依存、拡張ライブラリ

上記表中の VERSION は Ruby のバージ...

Kernel$$-i -> String | nil (12266.0)

in-place 置換モードで用いられます。

...in-place 置換モードで用いられます。

コマンドラインオプション -i を指定したとき、空文字列になります。
-
i オプションに拡張子を渡した場合にはその拡張子が文字列として格納されます。

-
i オプションが指定されていな...
...い時の値は nil です。

スクリプト内で $-i に代入することもでき、
その場合は Object::ARGV の次の
ファイルを読み込み始めるタイミングで in-place 置換を開始します。

この変数はグローバルスコープです。

@see spec/rubycmd...

絞り込み条件を変える

Kernel$$-I -> [String] (12256.0)

Rubyライブラリをロードするときの検索パスです。

...の検索パスです。

Kernel
.#load や Kernel.#require
がファイルをロードする時に検索するディレクトリのリストを含む配列です。

起動時にはコマンドラインオプション -I で指定したディレクトリ、
環境変数 RUBYLIB の値、
コンパ...
...下に典型的な UNIX システム上でのロードパスを示します。

-
I で指定したパス
環境変数 RUBYLIB の値
/usr/local/lib/ruby/site_ruby/VERSION サイト固有、バージョン依存のライブラリ
/usr/local/lib/ruby/site_ruby/VERSION/ARCH サイト...
...ラリ
/usr/local/lib/ruby/site_ruby サイト固有ライブラリ
/usr/local/lib/ruby/VERSION 標準ライブラリ
/usr/local/lib/ruby/VERSION/ARCH 標準、システム依存、拡張ライブラリ

上記表中の VERSION は Ruby のバージ...

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

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

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

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

Kernel.#Rational(x, y = 1, exception: true) -> Rational | nil (6407.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...
...# => (1/3)
Rational("0.1", "0.3") # => (1/3)
Rational(Complex(1,2), 2) # => ((1/2)+(1/1)*i)
//}

ただし、1.8系とは異なり、Rational オブジェクトは常に既約(それ以上
約分できない状態)である事に注意してください。

//emlist[例][ruby]{
Rational(2, 6)...

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