From 973dca035ec861c3cbea0faf5e40ccfbcd84bb17 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 8 Mar 2002 07:03:09 +0000 Subject: * eval.c (cvar_cbase): utility function to find innermost non singleton cbase. * eval.c (is_defined): adopt new cvar behavior. * eval.c (rb_eval): ditto. * eval.c (assign): ditto. * class.c (rb_mod_clone): should not call rb_obj_clone(), since Module does not provide "allocate". * class.c (rb_singleton_class): should crate new singleton class if obj is a class or module and attached object is different, which means metaclass of singleton class is sought. * time.c (time_s_alloc): now follows allocation framework. * eval.c (rb_eval): should initialize outer class variables from methods in singleton class definitions. * eval.c (assign): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2169 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 f772325d0..18f08ce53 100644 --- a/array.c +++ b/array.c @@ -402,7 +402,7 @@ rb_ary_unshift(ary, item) VALUE ary, item; { rb_ary_modify(ary); - if (RARRAY(ary)->len >= RARRAY(ary)->aux.capa) { + if (RARRAY(ary)->len == RARRAY(ary)->aux.capa) { long capa_inc = RARRAY(ary)->aux.capa / 2; if (capa_inc < ARY_DEFAULT_SIZE) { capa_inc = ARY_DEFAULT_SIZE; -- cgit