Array#shift/unshift $B$N9bB.2=(B

e$B%o%J%Y$H?=$7$^$9!#e(B

[ruby-core:5861]e$B$N%Q%C%A$K6=L#$,$"$C$?$N$G!“e(B
RARRAY_PTR(ary)
e$B$h$jA0J}$K6u$-%a%b%j$rJ];}$9$k$h$&$K$9$k!”$H$$$&%"%$%G%#%"$r??;w$7$Fe(B
shift/unshift e$B$N9bB.2=$r$9$k%Q%C%A$r=q$$$F$_$^$7$?!#e(B
e$BD9$/$J$j$=$&[email protected]$C$?$N$Ge(B rb_ary_splice e$B$K$O?($C$F$$$^$;$s!#e(B

e$B85$N%Q%C%A$HHf3S$9$k$H!“C;$$$N$G%A%’%C%/!&%F%9%H$O$7$d$9$/$J$C$F$$$k$H;W$$$^$9!#e(B
e$B$H$j$”$($:e(B test_array.rb e$B$ODL$k$3$H$r3NG’$7$^$7$?!#e(B

Index: array.c

— array.c (revision 15844)
+++ array.c (working copy)
@@ -20,6 +20,7 @@
static ID id_cmp;

#define ARY_DEFAULT_SIZE 16
+#define ARY_DEFAULT_LCAPA 4

void
rb_mem_clear(register VALUE *mem, register long size)
@@ -45,9 +46,21 @@

#define ARY_CAPA(ary) RARRAY(ary)->aux.capa
#define RESIZE_CAPA(ary,capacity) do {\

  • REALLOC_N(RARRAY(ary)->ptr, VALUE, (capacity));\
  • RARRAY(ary)->ptr -= RARRAY(ary)->lcapa;\
  • REALLOC_N(RARRAY(ary)->ptr, VALUE, (capacity) +
    RARRAY(ary)->lcapa);\
  • RARRAY(ary)->ptr += RARRAY(ary)->lcapa;
    RARRAY(ary)->aux.capa = (capacity);
    } while (0)
    +#define RESIZE_LCAPA(ary,lcapacity) do {\
  • long offset = (lcapacity) - RARRAY(ary)->lcapa;\
  • if((lcapacity) < 0 || offset > RARRAY(ary)->aux.capa -
    RARRAY_LEN(ary)) {\
  • rb_raise(rb_eIndexError, “[BUG] invalid left-capacity”);\
  • }\
  • RARRAY_PTR(ary) += offset;\
  • MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary) - offset, VALUE,
    RARRAY_LEN(ary));\
  • RARRAY(ary)->aux.capa -= offset;\
  • RARRAY(ary)->lcapa = (lcapacity);
    +} while (0)

static inline void
rb_ary_modify_check(VALUE ary)
@@ -67,6 +80,7 @@
ptr = ALLOC_N(VALUE, RARRAY_LEN(ary));
FL_UNSET(ary, ELTS_SHARED);
RARRAY(ary)->aux.capa = RARRAY_LEN(ary);

  • RARRAY(ary)->lcapa = 0;
    MEMCPY(ptr, RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
    RARRAY(ary)->ptr = ptr;
    }
    @@ -102,6 +116,7 @@
    ary->len = 0;
    ary->ptr = 0;
    ary->aux.capa = 0;

  • ary->lcapa = 0;

    return (VALUE)ary;
    }
    @@ -121,6 +136,7 @@
    if (len == 0) len++;
    RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
    RARRAY(ary)->aux.capa = len;

  • RARRAY(ary)->lcapa = 0;

    return ary;
    }
    @@ -135,7 +151,11 @@
    VALUE
    rb_ary_new(void)
    {

  • return rb_ary_new2(ARY_DEFAULT_SIZE);
  • VALUE ary = rb_ary_new2(ARY_DEFAULT_SIZE + ARY_DEFAULT_LCAPA);
  • RARRAY(ary)->ptr += ARY_DEFAULT_LCAPA;
  • RARRAY(ary)->lcapa = ARY_DEFAULT_LCAPA;
  • RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE;
  • return ary;
    }

#include <stdarg.h>
@@ -177,7 +197,7 @@
rb_ary_free(VALUE ary)
{
if (!ARY_SHARED_P(ary)) {

  • xfree(RARRAY(ary)->ptr);
  • xfree(RARRAY(ary)->ptr - RARRAY(ary)->lcapa);
    }
    }

@@ -194,6 +214,7 @@
shared->len = RARRAY(ary)->len;
shared->ptr = RARRAY(ary)->ptr;
shared->aux.capa = RARRAY(ary)->aux.capa;

  • shared->lcapa = RARRAY(ary)->lcapa;
    RARRAY(ary)->aux.shared = (VALUE)shared;
    FL_SET(ary, ELTS_SHARED);
    OBJ_FREEZE(shared);
    @@ -292,7 +313,7 @@
    rb_ary_modify(ary);
    if (argc == 0) {
    if (RARRAY_PTR(ary) && !ARY_SHARED_P(ary)) {
  •  free(RARRAY(ary)->ptr);
    
  •  free(RARRAY(ary)->ptr - RARRAY(ary)->lcapa);
    
    }
    RARRAY(ary)->len = 0;
    if (rb_block_given_p()) {
    @@ -355,6 +376,7 @@
    }
    RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
    RARRAY(ary)->aux.capa = argc;
  • RARRAY(ary)->lcapa = 0;
    MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
    RARRAY(ary)->len = argc;

@@ -533,13 +555,11 @@
if (RARRAY_LEN(ary) == 0) return Qnil;
top = RARRAY_PTR(ary)[0];
if (!ARY_SHARED_P(ary)) {

  • if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
  •  MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, 
    

RARRAY_LEN(ary)-1);

  •  RARRAY(ary)->len--;
    
  •  return top;
    
  • if (RARRAY_LEN(ary) * 2 < RARRAY(ary)->lcapa) {
  •  RESIZE_LCAPA(ary, RARRAY_LEN(ary));
    
    }
  • RARRAY_PTR(ary)[0] = Qnil;
  • ary_make_shared(ary);
  • RARRAY(ary)->lcapa++;
  • RARRAY(ary)->aux.capa–;
    }
    RARRAY(ary)->ptr++; /* shift ptr */
    RARRAY(ary)->len–;
    @@ -577,14 +597,12 @@
    rb_ary_modify_check(ary);
    result = ary_shared_first(argc, argv, ary, Qfalse);
    n = RARRAY_LEN(result);
  • if (ARY_SHARED_P(ary)) {
  • RARRAY(ary)->ptr += n;
  • RARRAY(ary)->len -= n;
  • }
  • else {
  • MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE,
    RARRAY_LEN(ary)-n);
  • RARRAY(ary)->len -= n;
  • if (!ARY_SHARED_P(ary)) {

  • RARRAY(ary)->lcapa += n;

  • RARRAY(ary)->aux.capa -= n;
    }

  • RARRAY(ary)->ptr += n;

  • RARRAY(ary)->len -= n;

    return result;
    }
    @@ -608,12 +626,18 @@

    if (argc == 0) return ary;
    rb_ary_modify(ary);

  • if (RARRAY(ary)->aux.capa <= (len = RARRAY(ary)->len) + argc) {
  • RESIZE_CAPA(ary, len + argc + ARY_DEFAULT_SIZE);
  • if (RARRAY(ary)->lcapa < argc) {
  • long add_capa = ARY_DEFAULT_SIZE;
  • long add_lcapa = ARY_DEFAULT_LCAPA;
  • if (RARRAY(ary)->aux.capa <= (len = RARRAY(ary)->len) + argc +
    add_lcapa) {
  •  RESIZE_CAPA(ary, len + argc + add_capa + add_lcapa);
    
  • }
  • RESIZE_LCAPA(ary, RARRAY(ary)->lcapa + argc + add_lcapa);
    }
  • /* sliding items */
  • MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
  • RARRAY(ary)->ptr -= argc;
  • RARRAY(ary)->lcapa -= argc;
  • RARRAY(ary)->aux.capa += argc;
    MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
    RARRAY(ary)->len += argc;

@@ -1494,6 +1518,7 @@
RARRAY(ary)->ptr = RARRAY(tmp)->ptr;
RARRAY(ary)->len = RARRAY(tmp)->len;
RARRAY(ary)->aux.capa = RARRAY(tmp)->aux.capa;

  • RARRAY(ary)->lcapa = RARRAY(tmp)->lcapa;
    FL_UNSET(ary, ELTS_SHARED);
    rb_gc_force_recycle(tmp);
    }
    @@ -2019,7 +2044,7 @@
    if (copy == orig) return copy;
    shared = ary_make_shared(orig);
    if (!ARY_SHARED_P(copy)) {
  • ptr = RARRAY(copy)->ptr;
  • ptr = RARRAY(copy)->ptr - RARRAY(copy)->lcapa;
    xfree(ptr);
    }
    RARRAY(copy)->ptr = RARRAY(orig)->ptr;
    Index: include/ruby/ruby.h
    ===================================================================
    — include/ruby/ruby.h (revision 15844)
    +++ include/ruby/ruby.h (working copy)
    @@ -498,6 +498,7 @@
    VALUE shared;
    } aux;
    VALUE *ptr;
  • long lcapa;
    };
    #define RARRAY_LEN(a) RARRAY(a)->len
    #define RARRAY_PTR(a) RARRAY(a)->ptr

[email protected]$G$9!#e(B

At Fri, 28 Mar 2008 13:34:00 +0900,
wanabe wrote in [ruby-dev:34163]:

#define RARRAY_LEN(a) RARRAY(a)->len
#define RARRAY_PTR(a) RARRAY(a)->ptr

RArraye$B$K$O$b$&6u$-$,$J$$$N$G!“A4%*%V%8%’%/%H$N%5%$%:$,e(B1worde$BA}$(e(B
e$B$F$7$^$&!”$H$$$&$N$OG:$^$7$$$G$9$M!#e(B

[email protected]>;3OB9-$G$9!#e(B

At Fri, 28 Mar 2008 18:19:45 +0900,
Nobuyoshi N. wrote:

RArraye$B$K$O$b$&6u$-$,$J$$$N$G!“A4%*%V%8%’%/%H$N%5%$%:$,e(B1worde$BA}$(e(B
e$B$F$7$^$&!”$H$$$&$N$OG:$^$7$$$G$9$M!#e(B

e$B<BAu$NBgJQ$5$H$+$O9M$($:$KC1$K%"%$%G%"[email protected]$1$G$9$,!"e(Baux.capae$B$re(B
lene$B$H$N:9J,$K$9$k$J$I$NJ}K!$Ge(Blonge$B$h$j>[email protected]?t7?$KJQ$($F!“e(B
lcapae$B$H0l=o$Ke(Bauxe$B$N$H$3$m$K5M$a9~$`!”$H$$$&$N$O$I$&$G$7$g$&$+e(B?

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:34173] Re: Array#shift/unshift
e$B$N9bB.2=e(B”
on Fri, 28 Mar 2008 23:21:59 +0900, wanabe [email protected]
writes:

|08/03/28 e$B$Ke(B Nobuyoshi N.[email protected] e$B$5$s$O=q$-$^$7$?e(B:
|> RArraye$B$K$O$b$&6u$-$,$J$$$N$G!“A4%*%V%8%’%/%H$N%5%$%:$,e(B1worde$BA}$(e(B
|> e$B$F$7$^$&!”$H$$$&$N$OG:$^$7$$$G$9$M!#e(B
|
|e$B85$N%Q%C%A$HF1$8$/!“A0J}$K6u$-%a%b%j$,$”$k$+$I$&$+$N%U%i%[email protected]$7$Fe(B
|e$B6u$-$,$"[email protected]$1e(BRARRAY_PTR(ary)[-1]e$B$K%5%$%:$r=q$-9~$`$h$&$K$7$F$
$^$7$?!#e(B

e$B$"$j$,$H$&$4$6$$$^$9!#$G$b!"e(Bmake
test-alle$B$G$Oe(BSEGVe$B$9$k$h$&$Ge(B
e$B$9!#A02s$b$=$&$G$7$?$,!"[email protected]$r0];}$9$k$N$O$+$J$jFq$7$$$_$?e(B
e$B$$$G$9$M!#e(B

e$B%o%J%Y$G$9!#e(B

08/03/28 e$B$Ke(B Nobuyoshi N.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

RArraye$B$K$O$b$&6u$-$,$J$$$N$G!“A4%*%V%8%’%/%H$N%5%$%:$,e(B1worde$BA}$(e(B
e$B$F$7$^$&!”$H$$$&$N$OG:$^$7$$$G$9$M!#e(B

e$B85$N%Q%C%A$HF1$8$/!“A0J}$K6u$-%a%b%j$,$”$k$+$I$&$+$N%U%i%[email protected]$7$Fe(B
e$B6u$-$,$"[email protected]$1e(BRARRAY_PTR(ary)[-1]e$B$K%5%$%:$r=q$-9~$`$h$&$K$7$F$
$^$7$?!#e(B

Index: array.c

— array.c (revision 15844)
+++ array.c (working copy)
@@ -20,6 +20,7 @@
static ID id_cmp;

#define ARY_DEFAULT_SIZE 16
+#define ARY_DEFAULT_LCAPA 4

void
rb_mem_clear(register VALUE *mem, register long size)
@@ -45,11 +46,65 @@

#define ARY_CAPA(ary) RARRAY(ary)->aux.capa
#define RESIZE_CAPA(ary,capacity) do {\

  • REALLOC_N(RARRAY(ary)->ptr, VALUE, (capacity));\
  • long lcapacity = ARY_LCAPA(ary);\
  • RARRAY(ary)->ptr -= lcapacity;\
  • REALLOC_N(RARRAY(ary)->ptr, VALUE, (capacity) + lcapacity);\
  • RARRAY(ary)->ptr += lcapacity;
    RARRAY(ary)->aux.capa = (capacity);
    } while (0)

+#define ARY_LCAPA(ary)\

  • (FL_TEST(ary, RARRAY_LFREE) ? (long)RARRAY_PTR(ary)[-1] : 0)
    +#define RARRAY_TOP_PTR(ary) (RARRAY_PTR(ary) - ARY_LCAPA(ary))

static inline void
+rb_ary_copy_lcapa(VALUE dst, VALUE src)
+{

  • if (FL_TEST(src, RARRAY_LFREE)) {
  • FL_SET(dst, RARRAY_LFREE);
  • RARRAY_PTR(dst)[-1] = RARRAY_PTR(src)[-1];
  • } else {
  • FL_UNSET(dst, RARRAY_LFREE);
  • }
    +}

+static inline void
+rb_ary_set_lcapa_val(VALUE ary, long lcapacity)
+{

  • if (lcapacity != 0) {
  • FL_SET(ary, RARRAY_LFREE);
  • RARRAY_PTR(ary)[-1] = lcapacity;
  • } else {
  • FL_UNSET(ary, RARRAY_LFREE);
  • }
    +}

+static inline void
+rb_ary_slide_capa_vals(VALUE ary, long offset)
+{

  • if (offset < 0) {
  • rb_raise(rb_eNotImpError, “[BUG] array negative shift”); /* todo? */
  • } else {
  • RARRAY_PTR(ary)[offset - 1] = offset + ARY_LCAPA(ary);
  • FL_SET(ary, RARRAY_LFREE);
  • }
  • RARRAY(ary)->aux.capa -= offset;
    +}

+static inline void
+rb_ary_resize_lcapa(VALUE ary, long lcapacity)
+{

  • long offset = lcapacity - ARY_LCAPA(ary);
  • if (lcapacity < 0 || offset > RARRAY(ary)->aux.capa -
    RARRAY_LEN(ary)) {
  • rb_raise(rb_eIndexError, “[BUG] invalid left-capacity”);
  • }
  • RARRAY_PTR(ary) += offset;
  • MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary) - offset, VALUE,
    RARRAY_LEN(ary));
  • RARRAY(ary)->aux.capa -= offset;
  • rb_ary_set_lcapa_val(ary,lcapacity);
    +}

+static inline void
rb_ary_modify_check(VALUE ary)
{
if (OBJ_FROZEN(ary)) rb_error_frozen(“array”);
@@ -67,6 +122,7 @@
ptr = ALLOC_N(VALUE, RARRAY_LEN(ary));
FL_UNSET(ary, ELTS_SHARED);
RARRAY(ary)->aux.capa = RARRAY_LEN(ary);

  • FL_UNSET(ary, RARRAY_LFREE);
    MEMCPY(ptr, RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
    RARRAY(ary)->ptr = ptr;
    }
    @@ -102,6 +158,7 @@
    ary->len = 0;
    ary->ptr = 0;
    ary->aux.capa = 0;

  • FL_UNSET(ary, RARRAY_LFREE);

    return (VALUE)ary;
    }
    @@ -121,6 +178,7 @@
    if (len == 0) len++;
    RARRAY(ary)->ptr = ALLOC_N(VALUE, len);
    RARRAY(ary)->aux.capa = len;

  • FL_UNSET(RARRAY(ary), RARRAY_LFREE);

    return ary;
    }
    @@ -135,7 +193,14 @@
    VALUE
    rb_ary_new(void)
    {

  • return rb_ary_new2(ARY_DEFAULT_SIZE);
  • VALUE ary = rb_ary_new2(ARY_DEFAULT_SIZE + ARY_DEFAULT_LCAPA);
    +#if ARY_DEFAULT_LCAPA != 0
  • FL_SET(ary, RARRAY_LFREE);
  • RARRAY(ary)->ptr += ARY_DEFAULT_LCAPA;
  • RARRAY_PTR(ary)[-1] = ARY_DEFAULT_LCAPA;
    +#endif
  • RARRAY(ary)->aux.capa = ARY_DEFAULT_SIZE;
  • return ary;
    }

#include <stdarg.h>
@@ -177,7 +242,7 @@
rb_ary_free(VALUE ary)
{
if (!ARY_SHARED_P(ary)) {

  • xfree(RARRAY(ary)->ptr);
  • xfree(RARRAY_TOP_PTR(ary));
    }
    }

@@ -194,6 +259,9 @@
shared->len = RARRAY(ary)->len;
shared->ptr = RARRAY(ary)->ptr;
shared->aux.capa = RARRAY(ary)->aux.capa;

  • if(FL_TEST(shared, RARRAY_LFREE)) {
  •  FL_SET(ary, RARRAY_LFREE);
    
  • }
    RARRAY(ary)->aux.shared = (VALUE)shared;
    FL_SET(ary, ELTS_SHARED);
    OBJ_FREEZE(shared);
    @@ -292,7 +360,7 @@
    rb_ary_modify(ary);
    if (argc == 0) {
    if (RARRAY_PTR(ary) && !ARY_SHARED_P(ary)) {
  •  free(RARRAY(ary)->ptr);
    
  •  free(RARRAY_TOP_PTR(ary));
    
    }
    RARRAY(ary)->len = 0;
    if (rb_block_given_p()) {
    @@ -355,6 +423,7 @@
    }
    RARRAY(ary)->ptr = ALLOC_N(VALUE, argc);
    RARRAY(ary)->aux.capa = argc;
  • FL_UNSET(RARRAY(ary), RARRAY_LFREE);
    MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
    RARRAY(ary)->len = argc;

@@ -533,13 +602,10 @@
if (RARRAY_LEN(ary) == 0) return Qnil;
top = RARRAY_PTR(ary)[0];
if (!ARY_SHARED_P(ary)) {

  • if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
  •  MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, 
    

RARRAY_LEN(ary)-1);

  •  RARRAY(ary)->len--;
    
  •  return top;
    
  • if (RARRAY_LEN(ary) * 2 < ARY_LCAPA(ary)) {
  •  rb_ary_resize_lcapa(ary, RARRAY_LEN(ary));
    
    }
  • RARRAY_PTR(ary)[0] = Qnil;
  • ary_make_shared(ary);
  • rb_ary_slide_capa_vals(ary, 1);
    }
    RARRAY(ary)->ptr++; /* shift ptr */
    RARRAY(ary)->len–;
    @@ -577,14 +643,11 @@
    rb_ary_modify_check(ary);
    result = ary_shared_first(argc, argv, ary, Qfalse);
    n = RARRAY_LEN(result);
  • if (ARY_SHARED_P(ary)) {
  • RARRAY(ary)->ptr += n;
  • RARRAY(ary)->len -= n;
  • }
  • else {
  • MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE,
    RARRAY_LEN(ary)-n);
  • RARRAY(ary)->len -= n;
  • if (!ARY_SHARED_P(ary)) {

  • rb_ary_slide_capa_vals(ary, n);
    }

  • RARRAY(ary)->ptr += n;

  • RARRAY(ary)->len -= n;

    return result;
    }
    @@ -605,16 +668,25 @@
    rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
    {
    long len;

  • long lcapa;

    if (argc == 0) return ary;
    rb_ary_modify(ary);

  • if (RARRAY(ary)->aux.capa <= (len = RARRAY(ary)->len) + argc) {
  • RESIZE_CAPA(ary, len + argc + ARY_DEFAULT_SIZE);
  • lcapa = ARY_LCAPA(ary);
  • if (lcapa < argc) {
  • long add_capa = ARY_DEFAULT_SIZE;
  • long add_lcapa = argc + ARY_DEFAULT_LCAPA;
  • if (RARRAY(ary)->aux.capa <= (len = RARRAY(ary)->len) + add_lcapa) {
  •  RESIZE_CAPA(ary, len + add_capa + add_lcapa);
    
  • }
  • lcapa += add_lcapa;
  • rb_ary_resize_lcapa(ary, lcapa);
    }
  • /* sliding items */
  • MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
  • RARRAY(ary)->ptr -= argc;

  • RARRAY(ary)->aux.capa += argc;
    MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);

  • rb_ary_set_lcapa_val(ary, lcapa - argc);
    RARRAY(ary)->len += argc;

    return ary;
    @@ -1494,6 +1566,7 @@
    RARRAY(ary)->ptr = RARRAY(tmp)->ptr;
    RARRAY(ary)->len = RARRAY(tmp)->len;
    RARRAY(ary)->aux.capa = RARRAY(tmp)->aux.capa;

  • rb_ary_copy_lcapa(ary, tmp);
    FL_UNSET(ary, ELTS_SHARED);
    rb_gc_force_recycle(tmp);
    }
    @@ -2019,7 +2092,7 @@
    if (copy == orig) return copy;
    shared = ary_make_shared(orig);
    if (!ARY_SHARED_P(copy)) {

  • ptr = RARRAY(copy)->ptr;
  • ptr = RARRAY_TOP_PTR(copy);
    xfree(ptr);
    }
    RARRAY(copy)->ptr = RARRAY(orig)->ptr;
    Index: include/ruby/ruby.h
    ===================================================================
    — include/ruby/ruby.h (revision 15844)
    +++ include/ruby/ruby.h (working copy)
    @@ -499,6 +499,8 @@
    } aux;
    VALUE *ptr;
    };

+#define RARRAY_LFREE FL_USER3
#define RARRAY_LEN(a) RARRAY(a)->len
#define RARRAY_PTR(a) RARRAY(a)->ptr

e$B%o%J%Y$G$9!#e(B

08/03/31 e$B$Ke(B Yukihiro M.[email protected]
e$B$5$s$O=q$-$^$7$?e(B:

e$B$"$j$,$H$&$4$6$$$^$9!#$G$b!"e(Bmake test-alle$B$G$Oe(BSEGVe$B$9$k$h$&$Ge(B
e$B$9!#A02s$b$=$&$G$7$?$,!"[email protected]$r0];}$9$k$N$O$+$J$jFq$7$$$_$?e(B
e$B$$$G$9$M!#e(B

e$B3NG’$I$&$b$"$j$,$H$&$4$6$$$^$9!#e(B
e$B<j85$G$O2?EY$+%F%9%H$ODL$C$?$H;W$C$?$N$G$9$,!"$^[email protected]$+$C$?$h$&$G$9!#e(B

e$B$b$7$^$?5!2q$,$"$l$P!"$7$C$+$j%A%’%C%/$7$?>e$G=PD>$7$^$9!#$I$&$b$*A{$,$;$7$^$7$?!#e(B

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B

In message “Re: [ruby-dev:34249] Re: Array#shift/unshift
e$B$N9bB.2=e(B”
on Fri, 4 Apr 2008 11:29:22 +0900, wanabe [email protected]
writes:

|e$B$I$&$K$+$7$F<+J,[email protected]$7$h$&$H$7$?$N$G$9$,!"A4$/:F8=$7$^$;$s!#e(B
|e$B$h$m$7$1$l$P$I$N%F%9%H$N$I$N2U=j$Ge(B SEGV e$B$7$?$+65$($FD:$1$J$$$G$7$g$&$+!#e(B

e$B;d$N;H$C$F$$$ke(B

ruby 1.9.0 (2008-04-12 revision 0) [i686-linux]

e$B$G$O!"$[$$"$i$f$k%F%9%H$GMn$A$^$9!#$G!"LdBj$J$N$O8DJL$N%F%9e(B
e$B%H$G$O$J$$$h$&$G$9!#%P%C%/%H%l!<%9$G$Oe(B

/home/matz/work/ruby/lib/test/unit/collector/dir.rb:91

e$B$,I=<($5$l$F$$$^$9!#;~4V$,<h$l$?$i$b$&$A$g$C$HD4$Y$F$_$^$9!#e(B

e$B3N$+A02s$b;w$?$h$&$J>u67$G<h$j9~$a$J$+$C$?$h$&$J!#e(B

e$B%o%J%Y$G$9!#e(B

e$B$I$&$K$+$7$F<+J,[email protected]$7$h$&$H$7$?$N$G$9$,!"A4$/:F8=$7$^$;$s!#e(B
e$B$h$m$7$1$l$P$I$N%F%9%H$N$I$N2U=j$Ge(B SEGV
e$B$7$?$+65$($FD:$1$J$$$G$7$g$&$+!#e(B

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs