るりまサーチ

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

別のキーワード

  1. openssl g
  2. openssl g=
  3. dh g
  4. dsa g
  5. dh g=

ライブラリ

キーワード

検索結果

<< 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.

...turns 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_...
...s 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....

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.

...turns 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_...
...s 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....

Kernel#gem(gem_name, *version_requirements) -> bool (6201.0)

$LOAD_PATH に Ruby Gem を追加します。

...Ruby Gem を追加します。

指定された Gem をロードする前にその Gem が必要とする Gem をロードします。
バージョン情報を省略した場合は、最も高いバージョンの Gem をロードします。
指定された Gem やその Gem が必要とする Gem...
...が見つからなかった場合は
G
em::LoadError が発生します。

バージョンの指定方法に関しては Gem::Version を参照してください。

rubygems ライブラリがライブラリバージョンの衝突を検出しない限り、
g
em メソッドは全ての require メ...
...

=== 環境変数 GEM_SKIP

特定の Gem をロードしないようにするために環境変数 GEM_SKIP を定義することができます。
特定の Gem がまだインストールされていないという状況を試すために使用できます。

例:

G
EM_SKIP=libA:libB ruby-...

Kernel.#BigDecimal(s) -> BigDecimal (6201.0)

引数で指定した値を表す BigDecimal オブジェクトを生成します。

...引数で指定した値を表す BigDecimal オブジェクトを生成します。

@param s 数値を表現する初期値を文字列、Integer、
Float、Rational、BigDecimal オブジェクトのい
ずれかで指定します。
文字列中のスペースは無...
...ような割り算を実行するとき等に意味を持ちます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1") / BigDecimal("3") # => 0.333333333333333333e0
BigDecimal("1",10) / BigDecimal("3",10) # => 0.333333333333333333e0
//}
ただし、個々の演算における最...
...いは将来のバー
ジョンで若干変更される可能性があります。


@raise ArgumentError s に Float オブジェクトを指定し、n に
Float::DIG + 2 以上の値を指定した場合に発生します。
s に Float、Rational...

Kernel.#BigDecimal(s, exception: true) -> BigDecimal | nil (6201.0)

引数で指定した値を表す BigDecimal オブジェクトを生成します。

...引数で指定した値を表す BigDecimal オブジェクトを生成します。

@param s 数値を表現する初期値を文字列、Integer、
Float、Rational、BigDecimal オブジェクトのい
ずれかで指定します。
文字列中のスペースは無...
...ような割り算を実行するとき等に意味を持ちます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1") / BigDecimal("3") # => 0.333333333333333333e0
BigDecimal("1",10) / BigDecimal("3",10) # => 0.333333333333333333e0
//}
ただし、個々の演算における最...
...かった場合、
例外を発生する代わりに nil を返します。

@raise ArgumentError s に Float オブジェクトを指定し、n に
Float::DIG + 2 以上の値を指定した場合に発生します。
s に Float、Rational...

絞り込み条件を変える

Kernel.#BigDecimal(s, n) -> BigDecimal (6201.0)

引数で指定した値を表す BigDecimal オブジェクトを生成します。

...引数で指定した値を表す BigDecimal オブジェクトを生成します。

@param s 数値を表現する初期値を文字列、Integer、
Float、Rational、BigDecimal オブジェクトのい
ずれかで指定します。
文字列中のスペースは無...
...ような割り算を実行するとき等に意味を持ちます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1") / BigDecimal("3") # => 0.333333333333333333e0
BigDecimal("1",10) / BigDecimal("3",10) # => 0.333333333333333333e0
//}
ただし、個々の演算における最...
...いは将来のバー
ジョンで若干変更される可能性があります。


@raise ArgumentError s に Float オブジェクトを指定し、n に
Float::DIG + 2 以上の値を指定した場合に発生します。
s に Float、Rational...

Kernel.#BigDecimal(s, n, exception: true) -> BigDecimal | nil (6201.0)

引数で指定した値を表す BigDecimal オブジェクトを生成します。

...引数で指定した値を表す BigDecimal オブジェクトを生成します。

@param s 数値を表現する初期値を文字列、Integer、
Float、Rational、BigDecimal オブジェクトのい
ずれかで指定します。
文字列中のスペースは無...
...ような割り算を実行するとき等に意味を持ちます。
//emlist[][ruby]{
require "bigdecimal"
BigDecimal("1") / BigDecimal("3") # => 0.333333333333333333e0
BigDecimal("1",10) / BigDecimal("3",10) # => 0.333333333333333333e0
//}
ただし、個々の演算における最...
...かった場合、
例外を発生する代わりに nil を返します。

@raise ArgumentError s に Float オブジェクトを指定し、n に
Float::DIG + 2 以上の値を指定した場合に発生します。
s に Float、Rational...

Kernel.#Integer(arg, base = 0) -> Integer (6201.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 (6201.0)

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

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

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

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

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

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

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

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

@param base 基数として0か2から36の整数を指定します(引数argに文字列を指
定した場合の...
...{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9

p Integer(nil) # can't convert nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)

p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d1...

Kernel.#binding -> Binding (6201.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#DelegateClass(superclass) -> object (6101.0)

クラス 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 (6101.0)

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

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

@param name "MD5"や"SHA1"などのダイジェストを示す文字列を指定します。
@return Digest::MD5やDige...
...スタンスではなく、クラスを返します。注意してください。

例: Digest::MD、Digest::SHA1、Digest::SHA512のクラス名を順番に出力する。

require 'digest'
for a in ["MD5", "SHA1", "SHA512"]
p Digest(a) # => Digest::MD5, Digest::SHA1, Digest::SHA512
end...
<< 1 2 3 ... > >>