るりまサーチ (Ruby 3.0)

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

別のキーワード

  1. ripper/lexer lex
  2. lexer lex
  3. ripper lex
  4. irb irb/ruby-lex
  5. lex

ライブラリ

クラス

検索結果

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

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

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

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

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