798件ヒット
[1-100件を表示]
(0.063秒)
種類
- インスタンスメソッド (362)
- モジュール関数 (228)
- 特異メソッド (184)
- クラス (24)
クラス
- Array (39)
- BasicObject (12)
-
Encoding
:: Converter (48) - Enumerator (14)
- File (92)
- Float (18)
- IO (44)
- Integer (72)
- Method (12)
- Numeric (12)
- Object (12)
- Proc (12)
- String (57)
- Struct (12)
- Time (42)
- UnboundMethod (12)
モジュール
- Enumerable (24)
- Kernel (96)
- Math (12)
- ObjectSpace (48)
- Process (36)
-
Process
:: GID (24) -
Process
:: UID (24)
キーワード
- % (12)
- ** (12)
- Numeric (12)
- Rational (24)
-
_ _ id _ _ (12) - arity (36)
- at (42)
- chmod (12)
- chown (12)
- concat (9)
- count (12)
- delete (12)
- div (12)
-
each
_ object (48) - eid= (24)
- format (12)
- frexp (12)
-
grant
_ privilege (24) - groups (12)
- kill (12)
- lchmod (12)
- lchown (12)
- lutime (8)
- new (14)
- pack (21)
- pow (24)
-
primitive
_ convert (48) - round (30)
- spawn (60)
- sprintf (12)
- sum (42)
- syscall (12)
- sysseek (12)
-
to
_ f (24) -
to
_ int (12) - unlink (12)
- unpack (12)
- utime (12)
-
values
_ at (12) - write (32)
検索結果
先頭5件
-
Integer
# *(other) -> Numeric (39108.0) -
算術演算子。積を計算します。
...算術演算子。積を計算します。
@param other 二項演算の右側の引数(対象)
@return 計算結果
//emlist[][ruby]{
2 * 3 # => 6
//}... -
Integer
# **(other) -> Numeric (27109.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に......合に発生します。
@raise ArgumentError 計算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) #......=> -7
//}
計算結果が巨大すぎるときは ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other , modulo) -> Integer (24109.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に......合に発生します。
@raise ArgumentError 計算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) #......=> -7
//}
計算結果が巨大すぎるときは ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# pow(other) -> Numeric (24009.0) -
算術演算子。冪(べき乗)を計算します。
...elf**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に負の数を指定した場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0......# => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) # => -7
//}
結果が巨大すぎる整数になりそうなとき、警告を出したうえで Float::INFINITY を返します。
//emlist[計算を......放棄して Float::INFINITY を返す例][ruby]{
p 100**9999999
# => warning: in a**b, b may be too big
# Infinity
//}
判定の閾値は変わりえます。
@see BigDecimal#power......(対象)
@param modulo 指定すると、計算途中に巨大な値を生成せずに (self**other) % modulo と同じ結果を返します。
@return 計算結果
@raise TypeError 2引数 pow で Integer 以外を指定した場合に発生します。
@raise RangeError 2引数 pow で other に......合に発生します。
@raise ArgumentError 計算結果が巨大になりすぎる場合に発生します。
//emlist[][ruby]{
2 ** 3 # => 8
2 ** 0 # => 1
0 ** 0 # => 1
3.pow(3, 8) # => 3
3.pow(3, -8) # => -5
3.pow(2, -2) # => -1
-3.pow(3, 8) # => 5
-3.pow(3, -8) # => -3
5.pow(2, -8) #......=> -7
//}
計算結果が巨大すぎるときは ArgumentError が発生します。
//emlist[計算結果が巨大すぎる例][ruby]{
p 100**9999999999999999999
# => exponent is too large (ArgumentError)
//}
判定の閾値は変わりえます。
@see BigDecimal#power... -
Integer
# round(ndigits = 0 , half: :up) -> Integer | Float (21127.0) -
self ともっとも近い整数を返します。
...を指定した場合、Integer を返します。
小数点位置から左に少なくとも n 個の 0 が並びます。
@param half ちょうど半分の値の丸め方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠......い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # => 1
1.round(2) # => 1.0
15.round(-1) # => 20
(-15).round(-1) # => -20
25.round(-1, half: :up) # => 30
25.roun... -
Integer
# round(ndigits = 0 , half: :up) -> Integer (21121.0) -
self ともっとも近い整数を返します。
...方を指定します。
サポートされている値は以下の通りです。
* :up or nil: 0から遠い方に丸められます。
* :even: もっとも近い偶数に丸められます。
* :down: 0に近い方に丸められます。
//emlist[][ruby]{
1.round # => 1
1.ro... -
Integer
# to _ f -> Float (21014.0) -
self を浮動小数点数(Float)に変換します。
...self を浮動小数点数(Float)に変換します。
self が Float の範囲に収まらない場合、Float::INFINITY を返します。
//emlist[][ruby]{
1.to_f # => 1.0
(Float::MAX.to_i * 2).to_f # => Infinity
(-Float::MAX.to_i * 2).to_f # => -Infinity
//}... -
Kernel
. # spawn(env , program , *args , options={}) -> Integer (323.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグループ
* resource limit
* カレントディレクトリ
* umask
* 子プロセスでのリダイレクト
などを変更できます。環境変数のクリアなど......す。
* 単一のファイルデスクリプタ
* ファイルデスクリプタの配列
配列を渡すことで複数のファイルデスクリプタを同時にリダイレクトできます。
Hash の値(親プロセス側)には以下のいずれかが指定できます。
* 単一......のファイルデスクリプタ
* リダイレクト先のファイル名文字列
* [リダイレクト先のファイル名文字列]、配列の要素にすることで
File::Constants::RDONLY でファイルを開いてリダイレクトします。
* [リダイレクト先のファ... -
Kernel
. # spawn(program , *args) -> Integer (323.0) -
引数を外部コマンドとして実行しますが、生成した 子プロセスの終了を待ち合わせません。生成した子プロセスのプロセスIDを返します。
...== option引数の概要
Hash を options として渡すことで、起動される子プロセスの
* プロセスグループ
* resource limit
* カレントディレクトリ
* umask
* 子プロセスでのリダイレクト
などを変更できます。環境変数のクリアなど......す。
* 単一のファイルデスクリプタ
* ファイルデスクリプタの配列
配列を渡すことで複数のファイルデスクリプタを同時にリダイレクトできます。
Hash の値(親プロセス側)には以下のいずれかが指定できます。
* 単一......のファイルデスクリプタ
* リダイレクト先のファイル名文字列
* [リダイレクト先のファイル名文字列]、配列の要素にすることで
File::Constants::RDONLY でファイルを開いてリダイレクトします。
* [リダイレクト先のファ... -
Process
. # kill(signal , pid , *rest) -> Integer (222.0) -
pid で指定されたプロセスにシグナルを送ります。signal はシグナル番号(整数)かその名前(文字列またはSymbol)で指定します。 全てのシグナル送信に成功した場合、指定した pid の総数を返します。
...場合は以下のような意味になります。
* 0 の場合はカレントプロセスのプロセスグループにシグナルを送ります。
* -1 の場合はシステム上の全てのプロセスにシグナルを送ります。
* それ以外の負の整数を与えるとプロセ...