Check exception flag as a bool [Bug #15987]

This commit is contained in:
Nobuyoshi Nakada 2019-07-11 19:20:53 +09:00
parent cd069df365
commit 3e7d002118
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
12 changed files with 92 additions and 42 deletions

View file

@ -477,13 +477,7 @@ nucomp_f_complex(int argc, VALUE *argv, VALUE klass)
a2 = Qundef;
}
if (!NIL_P(opts)) {
static ID kwds[1];
VALUE exception;
if (!kwds[0]) {
kwds[0] = idException;
}
rb_get_kwargs(opts, kwds, 0, 1, &exception);
raise = (exception != Qfalse);
raise = rb_opts_exception_p(opts, raise);
}
return nucomp_convert(rb_cComplex, a1, a2, raise);
}