mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
complex.rb: unary plus (+@) to return self avoiding copying.
This commit is contained in:
@@ -12,7 +12,7 @@ class Complex < Numeric
|
||||
end
|
||||
|
||||
def +@
|
||||
Complex(real, imaginary)
|
||||
self
|
||||
end
|
||||
|
||||
def -@
|
||||
|
||||
Reference in New Issue
Block a user