るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
106件ヒット [101-106件を表示] (0.033秒)

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric %
  4. numeric i
  5. numeric +@

クラス

モジュール

キーワード

検索結果

<< < 1 2 >>

Rational#/(other) -> Rational | Float (25.0)

商を計算します。

商を計算します。

@param other 自身を割る数

other に Float を指定した場合は、計算結果を Float で返します。

//emlist[例][ruby]{
r = Rational(3, 4)
r / 2 # => (3/8)
r / 2.0 # => 0.375
r / 0.5 # => 1.5
r / Rational(1, 2) # => (3/2)
r / 0 # => ZeroDivisionError
//}

@raise ZeroD...

Rational#quo(other) -> Rational | Float (25.0)

商を計算します。

商を計算します。

@param other 自身を割る数

other に Float を指定した場合は、計算結果を Float で返します。

//emlist[例][ruby]{
r = Rational(3, 4)
r / 2 # => (3/8)
r / 2.0 # => 0.375
r / 0.5 # => 1.5
r / Rational(1, 2) # => (3/2)
r / 0 # => ZeroDivisionError
//}

@raise ZeroD...

UnboundMethod#owner -> Class | Module (25.0)

このメソッドが定義されている class か module を返します。

このメソッドが定義されている class か module を返します。

//emlist[例][ruby]{
Integer.instance_method(:to_s).owner # => Integer
Integer.instance_method(:to_c).owner # => Numeric
Integer.instance_method(:hash).owner # => Kernel
//}

Integer#pow(other, modulo) -> Integer (13.0)

算術演算子。冪(べき乗)を計算します。

算術演算子。冪(べき乗)を計算します。

@param other 二項演算の右側の引数(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。

//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
...

Time.at(time) -> Time (13.0)

time で指定した時刻の Time オブジェクトを返します。

time で指定した時刻の Time オブジェクトを返します。

引数が数値の場合、生成された Time オブジェクトのタイムゾーンは地方時となります。

@param time Time オブジェクト、もしくは起算時からの経過秒数を表わす数値で指定します。

//emlist[][ruby]{
Time.at(0) # => 1970-01-01 09:00:00 +0900
Time.at(Time.at(0)) # => 1970-01-01 09:00:00 +0900
Time...

絞り込み条件を変える

GC.stat(result_hash = {}) -> {Symbol => Integer} (10.0)

GC 内部の統計情報を Hash で返します。

GC 内部の統計情報を Hash で返します。

@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。


@param key 得られる統計情報から特定の情報を取得したい場合にキーを
Symbol で指定します。

@return GC 内部の統計情報をHash で返します。
引数 key を指定した場合は数値を返します。

GC.stat
# =>
...
<< < 1 2 >>