るりまサーチ (Ruby 3.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.040秒)
トップページ > クエリ:Ruby[x] > クエリ:on[x] > クラス:Integer[x] > クエリ:to_r[x] > バージョン:3.0[x]

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception=
  5. _builtin abort_on_exception

ライブラリ

検索結果

Integer#to_r -> Rational (54661.0)

自身を Rational に変換します。

自身を Rational に変換します。

//emlist[][ruby]{
1.to_r # => (1/1)
(1<<64).to_r # => (18446744073709551616/1)
//}