diff options
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1267,6 +1267,9 @@ gc_mark_children(rb_objspace_t *objspace, VALUE ptr, int lev) break; case T_REGEXP: + gc_mark(objspace, obj->as.regexp.src, lev); + break; + case T_FLOAT: case T_BIGNUM: break; @@ -1505,9 +1508,6 @@ obj_free(rb_objspace_t *objspace, VALUE obj) if (RANY(obj)->as.regexp.ptr) { onig_free(RANY(obj)->as.regexp.ptr); } - if (RANY(obj)->as.regexp.str) { - xfree(RANY(obj)->as.regexp.str); - } break; case T_DATA: if (DATA_PTR(obj)) { |