るりまサーチ

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

別のキーワード

  1. _builtin to_r
  2. open3 pipeline_r
  3. matrix elements_to_r
  4. bigdecimal to_r
  5. fileutils cp_r

ライブラリ

クラス

検索結果

Rational#==(other) -> bool (42367.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.33 # => false
Rational
('1/2') == '1/2' # => false
//}...