ext/vector_complex.c in gsl-1.12.108 vs ext/vector_complex.c in gsl-1.12.109

- old
+ new

@@ -287,10 +287,17 @@ Data_Get_Struct(obj, gsl_vector_complex, v); other = argv[argc-1]; if(argc == 1) { - rb_gsl_vector_complex_set_all(argc, argv, obj); + // // If assigning from another vector + if(VECTOR_P(other) || VECTOR_COMPLEX_P(other)) { + // treat as assignment to v.subvector(...) + rb_gsl_vector_complex_set_subvector(argc-1, argv, v, other); + } else { + // treat as set_all + rb_gsl_vector_complex_set_all(argc, argv, obj); + } } else if(argc == 2 && TYPE(argv[0]) == T_FIXNUM) { // v[i] = x ii = FIX2INT(argv[0]); if(ii < 0) ii += v->size; // Get/make GSL::Complex from second arg