mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use RARRAY_SHARED_ROOT_FLAG for checking re-enter
RARRAY_SHARED_ROOT_FLAG is defined as FL_USER5, but we should use RARRAY_SHARED_ROOT_FLAG instead of depending on that they're equal.
This commit is contained in:
parent
76e594d515
commit
26187a8520
Notes:
git
2022-02-14 23:36:18 +09:00
1 changed files with 3 additions and 3 deletions
6
array.c
6
array.c
|
@ -7230,13 +7230,13 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
|
||||||
|
|
||||||
/* put it on the result array */
|
/* put it on the result array */
|
||||||
if (NIL_P(result)) {
|
if (NIL_P(result)) {
|
||||||
FL_SET(t0, FL_USER5);
|
FL_SET(t0, RARRAY_SHARED_ROOT_FLAG);
|
||||||
rb_yield(subarray);
|
rb_yield(subarray);
|
||||||
if (! FL_TEST(t0, FL_USER5)) {
|
if (!FL_TEST(t0, RARRAY_SHARED_ROOT_FLAG)) {
|
||||||
rb_raise(rb_eRuntimeError, "product reentered");
|
rb_raise(rb_eRuntimeError, "product reentered");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
FL_UNSET(t0, FL_USER5);
|
FL_UNSET(t0, RARRAY_SHARED_ROOT_FLAG);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue