summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 1 insertions, 3 deletions
diff --git a/parse.y b/parse.y
index 8a541a880d..cb42db7497 100644
--- a/parse.y
+++ b/parse.y
@@ -5948,9 +5948,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);
}