るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.007秒)
トップページ > バージョン:2.1.0[x] > クエリ:TypeError[x] > クラス:Complex[x]

別のキーワード

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

ライブラリ

検索結果

Complex#coerce(other) -> [Complex, Complex] (22.0)

other を Complex に変換して [変換後の other, self] の配列を返します。

...other を Complex に変換して [変換後の other, self] の配列を返します。

@raise TypeError 変換できないオブジェクトを指定した場合に発生します。

//emlist[例][ruby]{
Complex
(1).coerce(2) # => [(2+0i), (1+0i)]
//}...