From 49f75703ccef5271d3835501316408ef244cef27 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Wed, 24 Mar 2021 11:06:48 +0900 Subject: complex.rb: unary plus (`+@`) to return self avoiding copying. --- mrbgems/mruby-complex/mrblib/complex.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mrbgems/mruby-complex') diff --git a/mrbgems/mruby-complex/mrblib/complex.rb b/mrbgems/mruby-complex/mrblib/complex.rb index cd000a6c6..4c36179cb 100644 --- a/mrbgems/mruby-complex/mrblib/complex.rb +++ b/mrbgems/mruby-complex/mrblib/complex.rb @@ -12,7 +12,7 @@ class Complex < Numeric end def +@ - Complex(real, imaginary) + self end def -@ -- cgit v1.2.3