summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 05:33:36 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-18 05:33:36 +0000
commit1128e61562bd05ade1afcc8b2a7b52a37b7818e6 (patch)
treedc512ccada286583cbd331ce0a4b60622a99c85d /array.c
parent829ab73879fe7b997a295e2d4c4684fd528105dc (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@22395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/array.c b/array.c
index ca23dd4922..8ec325c0c9 100644
--- a/array.c
+++ b/array.c
@@ -1469,6 +1469,12 @@ rb_ary_dup(VALUE ary)
return dup;
}
+VALUE
+rb_ary_resurrect(VALUE ary)
+{
+ return rb_ary_new4(RARRAY_LEN(ary), RARRAY_PTR(ary));
+}
+
extern VALUE rb_output_fs;
static VALUE