るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.025秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:TypeError[x] > クラス:Integer[x]

別のキーワード

  1. _builtin typeerror
  2. sort typeerror
  3. dump typeerror
  4. $@ typeerror
  5. $~ typeerror

キーワード

検索結果

Integer#**(other) -> Numeric (9.0)

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

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

Integer#pow(other) -> Numeric (9.0)

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

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

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

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

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

Integer.try_convert(obj) -> Integer | nil (9.0)

obj を Integer に変換しようと試みます。変換には Object#to_int メソッドが使われます。

...obj を Integer に変換しようと試みます。変換には Object#to_int
メソッドが使われます。

Integer
ならそのままobjを返します。
そうでなければ obj.to_int の結果を返すか、nil が返されます。

@param obj 変換する任意のオブジェクト...
...@return Integer または nil
@raise TypeError to_int が Integer を返さなかった場合に発生します。

//emlist[例][ruby]{
Integer
.try_convert(1) # => 1
Integer
.try_convert(1.25) # => 1
Integer
.try_convert([]) # => nil
//}...