summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-complex/mrblib/complex.rb
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-03-21 08:30:52 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-03-21 08:30:52 +0900
commit73056aeb2b8e67145ee4bf28cd99a6cbb4224231 (patch)
treedaa94bfcd66a0fc827a56dea4b51fa05446192dd /mrbgems/mruby-complex/mrblib/complex.rb
parenta6d4477a09ae9ca2af97bdcecd25911da5a75a7c (diff)
downloadmruby-73056aeb2b8e67145ee4bf28cd99a6cbb4224231.tar.gz
mruby-73056aeb2b8e67145ee4bf28cd99a6cbb4224231.zip
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.
Diffstat (limited to 'mrbgems/mruby-complex/mrblib/complex.rb')
-rw-r--r--mrbgems/mruby-complex/mrblib/complex.rb8
1 files changed, 0 insertions, 8 deletions
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