зеркало из https://github.com/github/ruby.git
* array.c (rb_ary_product): Do not rely on GC, t0 should be
checked explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
66c8f4680f
Коммит
97b1c9edd2
|
@ -1,3 +1,8 @@
|
|||
Fri May 28 11:40:07 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
|
||||
|
||||
* array.c (rb_ary_product): Do not rely on GC, t0 should be
|
||||
checked explicitly.
|
||||
|
||||
Fri May 28 10:40:37 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (checking_for): ignore toplevel.
|
||||
|
|
6
array.c
6
array.c
|
@ -4345,10 +4345,14 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
|
|||
|
||||
/* put it on the result array */
|
||||
if(NIL_P(result)) {
|
||||
FL_SET(t0, FL_USER5);
|
||||
rb_yield(subarray);
|
||||
if (RBASIC(t0)->klass) {
|
||||
if (! FL_TEST(t0, FL_USER5)) {
|
||||
rb_raise(rb_eRuntimeError, "product reentered");
|
||||
}
|
||||
else {
|
||||
FL_UNSET(t0, FL_USER5);
|
||||
}
|
||||
}
|
||||
else {
|
||||
rb_ary_push(result, subarray);
|
||||
|
|
Загрузка…
Ссылка в новой задаче