ruby-changes:50444
From: mrkn <ko1@a...>
Date: Sat, 24 Feb 2018 23:56:42 +0900 (JST)
Subject: [ruby-changes:50444] mrkn:r62564 (trunk): rational.c: simplify a branch condition
mrkn 2018-02-24 23:56:36 +0900 (Sat, 24 Feb 2018) New Revision: 62564 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62564 Log: rational.c: simplify a branch condition * rational.c (nurat_s_convert): simplify a branch condition. Modified files: trunk/rational.c Index: rational.c =================================================================== --- rational.c (revision 62563) +++ rational.c (revision 62564) @@ -2620,7 +2620,7 @@ nurat_s_convert(int argc, VALUE *argv, V https://github.com/ruby/ruby/blob/trunk/rational.c#L2620 } if (argc == 1) { - if (!(k_numeric_p(a1) && k_integer_p(a1))) + if (!k_integer_p(a1)) return rb_convert_type_with_id(a1, T_RATIONAL, "Rational", idTo_r); } else { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/