From 73056aeb2b8e67145ee4bf28cd99a6cbb4224231 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 21 Mar 2021 08:30:52 +0900 Subject: complex.c: define `Complex#==` in C. This change also fixes the error caused by `rational.c` that calls `mrb_complex_eq()`, which had been undefined. --- mrbgems/mruby-complex/mrblib/complex.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'mrbgems/mruby-complex/mrblib') diff --git a/mrbgems/mruby-complex/mrblib/complex.rb b/mrbgems/mruby-complex/mrblib/complex.rb index 0b5fc8f73..1484ff394 100644 --- a/mrbgems/mruby-complex/mrblib/complex.rb +++ b/mrbgems/mruby-complex/mrblib/complex.rb @@ -52,14 +52,6 @@ class Complex < Numeric end alias_method :quo, :/ - def ==(rhs) - if rhs.is_a? Complex - real == rhs.real && imaginary == rhs.imaginary - elsif rhs.is_a? Numeric - imaginary == 0 && real == rhs - end - end - def abs Math.hypot imaginary, real end -- cgit v1.2.3