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

parent 9ed212ef
......@@ -12,7 +12,7 @@ class Complex < Numeric
end
def +@
Complex(real, imaginary)
self
end
def -@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment