Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

corrected misleading comment on RB_GC_GUARD()

  • Loading branch information...
commit 6215f78f5c0da980d7e374dfa0ad55d1c9ad7d66 1 parent 2ea481b
@brentr authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  eval.c
View
2  eval.c
@@ -3585,7 +3585,7 @@ eval_node(slit, VALUE)
case NODE_DREGX:
str2 = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
node->nd_cflag);
- RB_GC_GUARD(str); /* prevent tail call optimization here */
+ RB_GC_GUARD(str); /* ensure str is not GC'd in rb_reg_new */
return str2;
case NODE_DREGX_ONCE: /* regexp expand once */
str2 = rb_reg_new(RSTRING(str)->ptr, RSTRING(str)->len,
Please sign in to comment.
Something went wrong with that request. Please try again.