From b2d36552a1f91c78f7784440272ef50fcff65137 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 18 Feb 2009 05:33:36 +0000 Subject: * array.c (rb_ary_resurrect), string.c (rb_str_resurrect): new functions based on [ruby-dev:37983] * insns.def (putstring, duparray): use rb_{ary,str}_resurrect(). * iseq.c (iseq_data_to_ary): needs to result TS_VALUE. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 5004727b3..da36213f7 100644 --- a/string.c +++ b/string.c @@ -828,6 +828,11 @@ rb_str_dup(VALUE str) return str_duplicate(rb_obj_class(str), str); } +VALUE +rb_str_resurrect(VALUE str) +{ + return rb_str_replace(str_alloc(rb_cString), str); +} /* * call-seq: -- cgit