summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2022-02-11 15:44:08 -0500
committerPeter Zhu <peter@peterzhu.ca>2022-02-14 09:35:54 -0500
commit26187a8520b8c6645206a2064c11a7ab86a89845 (patch)
tree587b239dd303ac8450bc31063a0b468a73865e08 /array.c
parent76e594d5157bd763636adb096d4aa06688ac03ac (diff)
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.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5547
Diffstat (limited to 'array.c')
-rw-r--r--array.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/array.c b/array.c
index 82d374d0ba..a7d635eff7 100644
--- a/array.c
+++ b/array.c
@@ -7230,13 +7230,13 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
/* put it on the result array */
if (NIL_P(result)) {
- FL_SET(t0, FL_USER5);
+ FL_SET(t0, RARRAY_SHARED_ROOT_FLAG);
rb_yield(subarray);
- if (! FL_TEST(t0, FL_USER5)) {
+ if (!FL_TEST(t0, RARRAY_SHARED_ROOT_FLAG)) {
rb_raise(rb_eRuntimeError, "product reentered");
}
else {
- FL_UNSET(t0, FL_USER5);
+ FL_UNSET(t0, RARRAY_SHARED_ROOT_FLAG);
}
}
else {