るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.025秒)
トップページ > バージョン:2.4.0[x] > ライブラリ:ビルトイン[x] > クエリ:Numeric[x] > クエリ:real?[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric real?
  4. numeric real
  5. numeric eql?

クラス

検索結果

Numeric#real? -> bool (117421.0)

常に true を返します。(Complex またはそのサブクラスではないことを意味します。)

常に true を返します。(Complex またはそのサブクラスではないことを意味します。)

Numeric のサブクラスは、このメソッドを適切に再定義しなければなりません。

//emlist[例][ruby]{
10.real? # => true
-10.real? # => true
0.1.real? # => true
Rational(2, 3).real? # => true
//}

@see Numeric#integer?、Complex#real?

Complex#real? -> false (54367.0)

常に false を返します。

常に false を返します。

//emlist[例][ruby]{
(2+3i).real? # => false
(2+0i).real? # => false
//}

@see Numeric#real?