ext/lbfgsb/lbfgsbext.c in lbfgsb-0.3.0 vs ext/lbfgsb/lbfgsbext.c in lbfgsb-0.3.1
- old
+ new
@@ -156,9 +156,14 @@
rb_hash_aset(ret, ID2SYM(rb_intern("n_iter")), LONG2NUM(n_iter));
rb_hash_aset(ret, ID2SYM(rb_intern("n_fev")), LONG2NUM(n_fev));
rb_hash_aset(ret, ID2SYM(rb_intern("n_jev")), LONG2NUM(n_jev));
rb_hash_aset(ret, ID2SYM(rb_intern("success")), strncmp(task, "CONV", 4) == 0 ? Qtrue : Qfalse);
+ RB_GC_GUARD(x_val);
+ RB_GC_GUARD(l_val);
+ RB_GC_GUARD(u_val);
+ RB_GC_GUARD(nbd_val);
+
return ret;
}
void
Init_lbfgsbext(void)