diff --git a/ChangeLog b/ChangeLog index 9b41d05f9f..5fb481b179 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 28 16:41:59 2008 Akinori MUSHA + + * array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at the + beginning. [rubyspec] + Wed May 28 16:12:44 2008 Akinori MUSHA * lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler#do_GET): diff --git a/array.c b/array.c index 5dd172c157..39d2fbe931 100644 --- a/array.c +++ b/array.c @@ -1805,6 +1805,7 @@ rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary) VALUE arg1, arg2; long pos, len, orig_len; + rb_ary_modify_check(ary); if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) { pos = NUM2LONG(arg1); len = NUM2LONG(arg2);