るりまサーチ (Ruby 2.7.0)

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

クラス

検索結果

Rational#coerce(other) -> Array (63340.0)

自身と other が同じクラスになるよう、自身か other を変換し [other, self] という 配列にして返します。

自身と other が同じクラスになるよう、自身か other を変換し [other, self] という
配列にして返します。

@param other 比較または変換するオブジェクト

//emlist[例][ruby]{
Rational(1).coerce(2) # => [(2/1), (1/1)]
Rational(1).coerce(2.2) # => [2.2, 1.0]
//}

NEWS for Ruby 2.5.0 (163.0)

NEWS for Ruby 2.5.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...ms.org/2017/11/08/2.7.2-released.html
* https://blog.rubygems.org/2017/11/03/2.7.1-released.html
* https://blog.rubygems.org/2017/11/01/2.7.0-released.html
* https://blog.rubygems.org/2017/10/09/2.6.14-released.html
* https://blog.rubygems.org/2017/08/27/2.6.13-released.html...