complex.rb: unary plus (+@) to return self avoiding copying.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-03-24 11:06:48 +09:00
parent 9ed212ef9e
commit 49f75703cc
+1 -1
View File
@@ -12,7 +12,7 @@ class Complex < Numeric
end
def +@
Complex(real, imaginary)
self
end
def -@