From 66a5fcab3a510282df64c8f4b28d62ef2aa2f438 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 11 Feb 2009 05:46:17 +0000 Subject: * insns.def (setspecial, putstring): fixed typos in rdoc. * insns.def (toregexp): uses rb_ary_tmp_new(), and clears it after used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- insns.def | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'insns.def') diff --git a/insns.def b/insns.def index 2ffd0ea783..cd779d1393 100644 --- a/insns.def +++ b/insns.def @@ -89,7 +89,7 @@ getspecial /** @c variable @e set special local variable ($~, $_, ...) value as obj. - @j 特別なローカル変数($~, $_, ...)の値をを設定する。 + @j 特別なローカル変数($~, $_, ...)の値を設定する。 */ DEFINE_INSN setspecial @@ -365,7 +365,7 @@ putiseq /** @c put @e put string val. string will be copied. - @j 文字列ををコピーしてスタックにプッシュする。 + @j 文字列をコピーしてスタックにプッシュする。 */ DEFINE_INSN putstring @@ -425,13 +425,13 @@ toregexp { VALUE rb_reg_new_ary(VALUE ary, int options); int i; - const VALUE ary = rb_ary_new2(cnt); - RBASIC(ary)->klass = 0; + const VALUE ary = rb_ary_tmp_new(cnt); for (i = 0; i < cnt; i++) { rb_ary_store(ary, cnt-i-1, TOPN(i)); } POPN(cnt); val = rb_reg_new_ary(ary, opt); + rb_ary_clear(ary); } /** -- cgit v1.2.3