diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-21 08:30:52 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-21 08:30:52 +0900 |
| commit | 73056aeb2b8e67145ee4bf28cd99a6cbb4224231 (patch) | |
| tree | daa94bfcd66a0fc827a56dea4b51fa05446192dd /mrbgems/mruby-complex/mrblib/complex.rb | |
| parent | a6d4477a09ae9ca2af97bdcecd25911da5a75a7c (diff) | |
| download | mruby-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.rb | 8 |
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 |
