- self -> RationalRuby 1.9.1 から[permalink][rdoc][edit]-
単項演算子の - です。
例selfの符号を反転させたものを返します。r = Rational(3, 4) p(- r) # => (-3/4)
- self -> RationalRuby 1.9.1 から[permalink][rdoc][edit]
単項演算子の - です。
self の符号を反転させたものを返します。
r = Rational(3, 4)
p(- r) # => (-3/4)