Ruby 3.3 リファレンスマニュアル

instance method Integer#-@

- self -> IntegerRuby 2.4.0 から[permalink][rdoc][edit]

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

p(- 10) # => -10
p(- -10) # => 10