Ruby 2.5 instroduces extra checking for rb_funcall checking,
but apparently it is too strict for some compilers and extra
args should not cause fatal problems (only warnings).
Attached are over 500 gem-codesearch results of latest gems.
nitpick: Your query includes rb_funcall2, rb_funcall3, and rb_funcallv which are safe to pass "0, 0".
Oops :x
Btw, I guess this is undefined behavior?
In a standalone case, gcc prints "0", clang prints a randomly high
number. I expected compilation to fail with both compilers.
/* $CC -O2 -Wextra -Wall -o divzero /path/to/this/file.c */
#include <stdio.h>
int main(void)
{
int a = 0;
int b = 1;
int c = a / (a == b);
printf("%d\n", c);
return 0;
}