From 6a60393280046a4991da8a415a77c60c7be240b5 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 14 May 2004 16:39:15 +0000 Subject: * range.c (range_each_func): terminates loop if generating value is same to @end. [ruby-talk:100269] * string.c (rb_str_new4): should not reuse frozen shared string if the original is not an instance of String. [ruby-talk:100193] * time.c (time_mdump): preserve GMT bit in the marshal data. [ruby-talk:100213] * eval.c (is_defined): do not protect exception during receiver evaluation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index d779f279a0..53c50d4bbb 100644 --- a/array.c +++ b/array.c @@ -227,9 +227,9 @@ rb_values_new2(n, elts) val = ary_new(rb_cValues, n); if (n > 0 && elts) { + RARRAY(val)->len = n; MEMCPY(RARRAY(val)->ptr, elts, VALUE, n); } - RARRAY(val)->len = n; return val; } -- cgit v1.2.3