From 3e7d002118a92fad5934e11c75be6768a1476c1b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 11 Jul 2019 19:20:53 +0900 Subject: Check exception flag as a bool [Bug #15987] --- complex.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'complex.c') diff --git a/complex.c b/complex.c index 848d3ac8a9..42b32d4279 100644 --- a/complex.c +++ b/complex.c @@ -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); } -- cgit v1.2.3