From 676ab238a22c918e91fea43c048d24a690ba04b9 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 4 Dec 2025 20:56:27 +0900 Subject: [PATCH] mruby-complex: add parentheses to Math method calls added parentheses to Math.hypot and Math.atan2 calls where the return value is used. Co-authored-by: Claude --- mrbgems/mruby-complex/mrblib/complex.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mrbgems/mruby-complex/mrblib/complex.rb b/mrbgems/mruby-complex/mrblib/complex.rb index 8d58c334a..08173275b 100644 --- a/mrbgems/mruby-complex/mrblib/complex.rb +++ b/mrbgems/mruby-complex/mrblib/complex.rb @@ -97,7 +97,7 @@ class Complex < Numeric # Complex(3.0, -4.0).abs #=> 5.0 # def abs - Math.hypot imaginary, real + Math.hypot(imaginary, real) end alias_method :magnitude, :abs @@ -125,7 +125,7 @@ class Complex < Numeric # Complex.polar(3, Math::PI/2).arg #=> 1.5707963267948966 # def arg - Math.atan2 imaginary, real + Math.atan2(imaginary, real) end alias_method :angle, :arg alias_method :phase, :arg