diff --git a/mrbgems/mruby-complex/mrblib/complex.rb b/mrbgems/mruby-complex/mrblib/complex.rb index 4c36179cb..e341efc5d 100644 --- a/mrbgems/mruby-complex/mrblib/complex.rb +++ b/mrbgems/mruby-complex/mrblib/complex.rb @@ -74,3 +74,9 @@ class Complex < Numeric end undef i end + +class Numeric + def to_c + Complex(self, 0) + end +end