るりまサーチ (Ruby 2.6.0)

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

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

検索結果

Rational#-@ -> Rational (63610.0)

単項演算子の - です。 self の符号を反転させたものを返します。

...単項演算子の - です。
self の符号を反転させたものを返します。

//emlist[例][ruby]{
r = Rational(3, 4)
- r # => (-3/4)
//}...