1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rational.c: simplify a branch condition

* rational.c (nurat_s_convert): simplify a branch condition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mrkn 2018-02-24 14:56:36 +00:00
parent 8b9a3eaba6
commit daa67ca352

View file

@ -2620,7 +2620,7 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass)
}
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 {