るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.091秒)

別のキーワード

  1. _builtin enable
  2. mkmf enable_config
  3. pop enable_ssl
  4. pop3 enable_ssl
  5. kernel enable_config

ライブラリ

クラス

検索結果

BigDecimal#coerce(other) -> Array (54361.0)

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

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

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

BigDecimal#coerce は Ruby における強制型変換のための機能です。
BigDecimal オブジェクトとその他のオブジェクト間の各種の計算は
BigDecimal#coerce の結果を元に行われます。

//emlist[][ruby]{
require "bigdecimal"
a = BigDecimal("1.0")
b = a / 2.0 # => 0.5e0
...