summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/array.c b/array.c
index 64bfcfcf33..6b0396753f 100644
--- a/array.c
+++ b/array.c
@@ -4117,6 +4117,9 @@ rb_ary_product(int argc, VALUE *argv, VALUE ary)
/* put it on the result array */
if(NIL_P(result)) {
rb_yield(subarray);
+ if (RBASIC(t0)->klass) {
+ rb_raise(rb_eRuntimeError, "product reentered");
+ }
}
else {
rb_ary_push(result, subarray);