るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.174秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:n[x] > クエリ:l[x] > クエリ:spec[x] > クラス:Rational[x]

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n
  5. openssl n=

ライブラリ

検索結果

Rational#inspect -> String (15202.0)

自身を人間が読みやすい形の文字列表現にして返します。

...に10進数の表記を返します。

@return 有理数の表記にした文字列を返します。

//emlist[例][ruby]{
Rational
(5, 8).inspect # => "(5/8)"
Rational
(2).inspect # => "(2/1)"
Rational
(-8, 6).inspect # => "(-4/3)"
Rational
(0.5).inspect # => "(1/2)"
//}

@see Rational#to_s...