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 63358a6a30..35673cbfa8 100644
--- a/string.c
+++ b/string.c
@@ -1826,6 +1826,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)
{