complex.c (mrb_complex_copy): allow copying of complex numbers.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-07-11 11:25:31 +09:00
parent 67f47c9b42
commit bae11ef689
4 changed files with 18 additions and 0 deletions
+5
View File
@@ -2747,6 +2747,11 @@ init_copy(mrb_state *mrb, mrb_value dest, mrb_value obj)
mrb_rational_copy(mrb, dest, obj);
break;
#endif
#ifdef MRB_USE_COMPLEX
case MRB_TT_COMPLEX:
mrb_complex_copy(mrb, dest, obj);
break;
#endif
default:
break;