るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. _builtin rational
  2. rational **
  3. json/add/rational to_json
  4. json/add/rational json_create
  5. rational ==

ライブラリ

クラス

検索結果

Rational#==(other) -> bool (117502.0)

数値として等しいか判定します。

数値として等しいか判定します。

@param other 自身と比較する数値

@return self と other が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
Rational(2, 3) == Rational(2, 3) # => true
Rational(5) == 5 # => true
Rational(0) == 0.0 # => true
Rational('1/3') == 0....