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] --- rational.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 207c4c46b3..e137ac23e7 100644 --- a/rational.c +++ b/rational.c @@ -574,13 +574,7 @@ nurat_f_rational(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 nurat_convert(rb_cRational, a1, a2, raise); } -- cgit v1.2.3