summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-11 03:00:23 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-11 03:00:23 +0000
commit2bcff78b424a637cf2a057ac901da34fc298094a (patch)
tree787697a436fe97bbf705c0fe50d04f8858d40bfa /parse.y
parent2b131e1eb6d915f077f6b258a1f9ea4ef8bae98f (diff)
* string.c (dispose_string): use rb_str_free for freeing string in
parse.y. by Sokolov Yura <funny.falcon@gmail.com> https://github.com/ruby/ruby/pull/87 fix GH-87 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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);
}