summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/string.c b/string.c
index f101a94c32..e7f9b44324 100644
--- a/string.c
+++ b/string.c
@@ -1871,6 +1871,13 @@ rb_str_unlocktmp(VALUE str)
return str;
}
+VALUE
+rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg)
+{
+ rb_str_locktmp(str);
+ return rb_ensure(func, arg, rb_str_unlocktmp, str);
+}
+
void
rb_str_set_len(VALUE str, long len)
{