summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/string.c b/string.c
index d894b24daf..b9bd9098da 100644
--- a/string.c
+++ b/string.c
@@ -7517,6 +7517,9 @@ rb_str_enumerate_lines(int argc, VALUE *argv, VALUE str, int wantarray)
wantarray = 0;
#endif
}
+#if defined __GNUC__ && !defined __clang__
+ ASSUME(wantarray || !ary); /* if wantarray, ary does not matter */
+#endif
}
else {
if (wantarray)