Permalink
Browse files

use rb_str_free for freeing string in parse.y

  • Loading branch information...
1 parent e1fbcc4 commit 02f9f6bf8e973df14e572674bf9602e6e4dc3dd2 @funny-falcon committed Jan 23, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 parse.y
View
4 parse.y
@@ -6409,9 +6409,7 @@ parser_regx_options(struct parser_params *parser)
static void
dispose_string(VALUE str)
{
- /* TODO: should use another API? */
- if (RBASIC(str)->flags & RSTRING_NOEMBED)
- xfree(RSTRING_PTR(str));
+ rb_str_free(str);
rb_gc_force_recycle(str);
}

0 comments on commit 02f9f6b

Please sign in to comment.